We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Grid to Excel Export in web

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? 
Cheers
RCHT

6 Replies

MU Ms Usha Easwaran replied to Ms Usha Easwaran April 4, 2014 12:06 PM UTC

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? 
Cheers
RCHT

Sorry I meant  exporting  grid to Excel from a webform? Is that possible?


PK Prakash Kumar D Syncfusion Team April 7, 2014 05:32 AM UTC

Hi Usha Eashwaran,

Yes, it is possible. Please find the sample links

1.Syncfusion grid to Excel:
http://asp.syncfusion.com/demos/ui/gridgrouping/Export%20and%20Print/Excel%20Export/CS/ExcelExport.aspx

2.Microsoft grid to Excel:
http://asp.syncfusion.com/demos/reporting/XlsIO/Data%20Binding/ImportExportDataTable/CS/ImportExportDataTable.aspx

Regards,
Prakash



MU Ms Usha Easwaran April 8, 2014 08:32 AM UTC

Hi, 
I did try these links.. Thankyou. The microsoft grid to excel works.. but I wanted to export my customised grid to Excel.. is there a way.. I saw from the other link that if we used the syncfusion grid, it works, but I would like to try to export our customised grids as well. Pleas elet me know if there is a way for that
Thankyou


PK Prakash Kumar D Syncfusion Team April 9, 2014 01:19 PM UTC

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



MU Ms Usha Easwaran April 10, 2014 09:15 AM UTC

 Its a very simple grid, but would like to export it as it is to Excel.. I know it would lose the formatting colour etc but that is ok


PK Prakash Kumar D Syncfusion Team April 11, 2014 10:41 AM UTC

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


Loader.
Live Chat Icon For mobile
Up arrow icon