Hi Haneef,
Thanks For your response. Its not working. Its exported Data. Its exporting only data. I nedd Columns Hedader should display. I add following code. Please check it once.
Syncfusion.GridExcelConverter.GridExcelConverterControl gecc = new Syncfusion.GridExcelConverter.GridExcelConverterControl();
gecc.GridToExcel(this.gridDataBoundGrid1.Model, "c://Hazar/hazar3.xls", Syncfusion.GridExcelConverter.ConverterOptions.ColumnHeaders );
Please check it once and response me.
I am waiting for your reply.
Regards
Tannearu
>Hi Tannearu,
XlsIO libraries are used to support the conversion of grid contents to excel. The dlls that these depend are Syncfusion.XlsIO.Base and Syncfusion.GridConverter.Windows
Syncfusion.GridExcelConverter.GridExcelConverterControl gecc = new Syncfusion.GridExcelConverter.GridExcelConverterControl();
The code to include both the headers during export is given below.
gecc.GridToExcel(this.gridDataBoundGrid1.Model, "YourFileName", ConverterOptions.RowHeaders,ConverterOptions.ColumnHeaders) ;
The code to exclude headers during export is given below.
gecc.GridToExcel(this.gridDataBoundGrid1.Model, saveFileDialog.FileName);
Please refer to the following sample which demonstrates the excel export in a grid.
http://www.syncfusion.com/Support/user/uploads/GDBGExport_fecc01cd.zipBest Regards,
Haneef