I have a Gridview that reads the DataSource from an EntityDataSrouce. Now I want to convert the EntityDatasource of the gridview to DataTable so I can export it the Gridview as an Excel file.
Asked
Active
Viewed 1,102 times
1 Answers
0
You do not need to convert it to DataTable
just to export. You can do it by gridview self.
Look at this link: http://mattberseth.com/blog/2007/04/export_gridview_to_excel_1.html
In this article, the author uses a utility class that export it to .xls file, so, you can download it, add on your project and use like the sample.

Felipe Oriani
- 37,948
- 19
- 131
- 194