Hi,Just wondering if there is a way of exporting grid to excel in my web form, I have seen only code for windows forms?CheersRCHT
Hi Usha,
It would be grateful, If you share what kind of customized grid that you want to export? We can provide information accordingly.
Regards,
Prakash
Hi Usha,
You can achieve the requirement by creating a datatable and define datacolumns based on your grid, then read every row from grid and can add to the datatable. Using the following code snippet you can import data from data table to Excel. This option can help you to move data from your customized grid to excel sheet.
sheet.ImportDataTable(dataTable, false, 1, 1); |
Note: Number Format, Styles
in the grid will be removed in Excel.
Regards,
Prakash