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.
Unfortunately, activation email could not send to your email. Please try again.

Grid to Excel Export in web

Thread ID:

Created:

Updated:

Platform:

Replies:

116117 Apr 4,2014 04:51 AM Apr 11,2014 06:41 AM ASP.NET Web Forms (Classic) 6
loading
Tags: XlsIO
Ms Usha Easwaran
Asked On April 4, 2014 04:51 AM

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

Ms Usha Easwaran
Replied On April 4, 2014 08:06 AM

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?

Prakash Kumar D [Syncfusion]
Replied On April 7, 2014 01:32 AM

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


Ms Usha Easwaran
Replied On April 8, 2014 04:32 AM

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

Prakash Kumar D [Syncfusion]
Replied On April 9, 2014 09:19 AM

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


Ms Usha Easwaran
Replied On April 10, 2014 05:15 AM

 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

Prakash Kumar D [Syncfusion]
Replied On April 11, 2014 06:41 AM

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


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;