I need to Export DataGrids' Contents to Excel using VB.Net for a Window based Application.
How to do this.. any ideas ?
I need to Export DataGrids' Contents to Excel using VB.Net for a Window based Application.
How to do this.. any ideas ?
The are plenty of ways to do this. Create the excel file using static methods in the File class. Then you can create a OleDB connection to the excel file and then write all the data to it using SQL query.
Out of the box DataGrid doesn't support this feature. You can a. Use a third party data grid that has this feature b. Create a report that have the same contents as the grid. Report Viewer control that is freely available from Microsoft has the feature to export to Excel