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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback


Thread ID:





78271 Dec 7,2008 07:51 AM UTC Dec 8,2008 07:02 AM UTC WinForms 1
Tags: GridControl
Alenoosh Zomorodian
Asked On December 7, 2008 07:51 AM UTC

How can i have column header text instead of the column field name when exporting to Excel.
is there any reason that "GroupingGridToExcel" method of "GroupingGridExcelConverterControl" exports the field name? or it is a bug!

Thank you

Nisha Arockiya A [Syncfusion]
Replied On December 8, 2008 07:02 AM UTC

Hi Alenoosh,

Thanks for your interest in Syncfusion Products.

Export HeaderText:
It is possible to export the header text to excel after setting in GridGroupingControl using

//Setting Header text..
private void SetHeaderText(GridModel grid, IWorksheet sheet)
//Pass the Range and assign the Header Text
sheet.Range[3, 1].Text = "MyColumn1";
sheet.Range[3, 2].Text = "MyColumn2";
sheet.Range[3, 3].Text = "MyColumn3";

///Exporting to Excel..
Syncfusion.GroupingGridExcelConverter.GroupingGridExcelConverterControl converter = new Syncfusion.GroupingGridExcelConverter.GroupingGridExcelConverterControl();
IWorkbook myWorkBook = ExcelUtils.CreateWorkbook(1);
IWorksheet sheet = myWorkBook.Worksheets[0];
converter.GroupingGridToExcel(this.gridGroupingControl1, sheet, Syncfusion.GridExcelConverter.ConverterOptions.Default);
SetHeaderText(this.gridGroupingControl1.TableModel, sheet);

Here is a minimal sample;

Please let me know if this helps.



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.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

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