i have a winforms application and i want to export data from the datagridview into excel. how would i do this? thank u for any help
i want the simplest approach.
maybe exporting to CSV is easier?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You have a number of options
Those are a few options off the top of my head. Personally I would go with NPOI, I have used this in server based solutions and it is really easy to work with and quite fast. However it does not currenly support the xlsx file format, only standard xls.
The library can be found here
I also found EPPlus, supports xlsx, but I cannot vouch for it since I have not personally used it.