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. Image for the cookie policy date

Exporting Grid Grouping Control to Excel

I am trying to figure out how to export a Grid Grouping Control to excel in Syncfusion 5.1. I have searched around the forums and what I find seems to be based on version 6.0. Is it possible to export the data to Excel in Version 5.0 and if so how?

Thanks

Bill Langlais


1 Reply

HA haneefm Syncfusion Team February 7, 2008 03:05 PM UTC

Hi Bill,

The Excel export browser sample demonstrates the conversion of contents in a GridGroupingControl to an xls file. The Exporting of a GridGroupingControl has two options: one converts the entire contents in the grid while the other converts only the visible contents in the grid.

XlsIO libraries are used to convert the grid contents to excel. The dlls that these depend on are Syncfusion.XlsIO.Base and Syncfusion.GridConverter.Windows.

Syncfusion.GroupingGridExcelConverter.GroupingGridExcelConverterControl converter = new
Syncfusion.GroupingGridExcelConverter.GroupingGridExcelConverterControl();
converter.GroupingGridToExcel(this.gridGroupingControl1,
saveFileDialog.FileName,Syncfusion.GridExcelConverter.ConverterOptions.Default);

The above code converts the entire contents in the grid. The code to export the visible or expanded records or groups alone is given below.

converter.GroupingGridToExcel(this.gridGroupingControl1, saveFileDialog.FileName,
Syncfusion.GridExcelConverter.ConverterOptions.Visible);

Here is a path.
[instal drive]\Syncfusion\Essential Studio\[Version]\Windows\Grid.Grouping.Windows\Samples\Serialization\Excel Export

Sample : Excel Export.zip

Best Regards,
Haneef


Loader.
Live Chat Icon For mobile
Up arrow icon