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.
Syncfusion Feedback

Add more information when export a grid to excel

Thread ID:

Created:

Updated:

Platform:

Replies:

100429 Aug 5,2011 10:23 PM UTC Aug 16,2011 11:22 AM UTC Windows Forms 2
loading
Tags: GridControl
rayzhahng
Asked On August 5, 2011 10:23 PM UTC

We are using a gridgroupcontrol to display data, and also want to provide the export to excel functionality, what we need to do is to add some header and footers to the data displayed in the grid when exported to the excel, for example, we have following data

ID NAME
1 John
2 Raymond
3 Sarah

and we want the excel to look like

2011 Student Information

ID NAME
1 John
2 Raymond
3 Sarah

* Above only includes full time students.

Can anyone help?

Thanks



rayzhahng
Replied On August 8, 2011 10:59 PM UTC

Can any one please help?


Kalaiarasan B [Syncfusion]
Replied On August 16, 2011 11:22 AM UTC

Hi rayzhahng,

We regret for the delay in getting back to you.

please refer the following code to display headers in the excel worksheet after exporting to excel


sheet.UsedRange.MoveTo(sheet[row, column, lastRow, lastCol]);
sheet.UsedRange["A3:D3"].Merge(true);
sheet.UsedRange["A3:D3"].Text = "This is Description";

Sample for reference
http://www.syncfusion.com/uploads/redirect.aspx?&team=support&file=GCExportWithHeaderSheetshow-1881380379.zip

Regards,
Kalai


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.

Warning Icon 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.Close Icon

;