export datagridview to Excel Document  
Author Message
ckob





PostPosted: Visual C# General, export datagridview to Excel Document Top

I did a search and did find a post on this however I couldn't get it to work but I was wondering if anyone had a solution to exporting datagridview columns and data to a excel spreadsheet


Visual C#14  
 
 
cverdon





PostPosted: Visual C# General, export datagridview to Excel Document Top

One simple solution is to create a csv file with the data.

You just have to write a for loop on your datasource, dump the data in the file in the csv format, and then you can dblclick on the file to open it in excel.

Charles