Add more information when export a grid to excel

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



2 Replies

RA rayzhahng August 8, 2011 10:59 PM UTC

Can any one please help?



KB Kalaiarasan B Syncfusion Team 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


Loader.
Up arrow icon