I’m extracting data from the database into a DataTable and displaying it by binding it to a Repeater control. Now I need to copy the same data into an excel spreadsheet. How can i use the same DataTable to the fill the spreadsheet. Please suggest.
I’m extracting data from the database into a DataTable and displaying it by binding
Share
I would suggest to create a real excel-file instead of a html table(what many people do). Therefor i can warmly recommend
EPPlus(LGPL license).Then it is simple. Assuming that you have a button
BtnExportExcel: