Hi Rafiq,
Thanks for using Syncfusion products.
With version 6.3.1.8, we have the Excel export feature implemented with full support to the auto-formats present in the Grid.
Please refer the sample from below link:
http://websamples.syncfusion.com/samples/Grid.Web/6.3.1.8/Grid_Web_ExcelExport/main.htmIn the above sample the App_Code contains the following files which has the code for EcelExport
. GridBaseExport -Common Base class for Excel export.
. GridExcelExport -Class which has been inherited from the base class, initialize the Excel file and export the data with styles.
The export() presents inside the GridExcelExport class. This is the method which actually exports the Grid data to the Excel sheet. Please refer the below code snippet which illustrates this:
ExcelExport:
GridExcelExport excel = new GridExcelExport(this.GridGroupingControl1, "excel.xls");
excel.Export();
The GridExcelExport class constructors accepts the following as its arguments:
1. The Grid object, which is going to be exported.
2. Name of the file to which the data is going to be exported.
The GridExcelExport class contains the following properties.
. AutoFormat - Return the "AutoFormat" applied to the Grid.
. UseAutoFormat - Return true if AutoFormat is set to the Grid else false.
. ExportNestedTable - If it is set to "False" Nestedtables can't be exported. By default it is "true".
. FileName - Return the name of the exported file.
. GridGroupingControl - Return the name of the exported file.
Also, we are happy to inform you that, we have new feature implemented for ExcelExport and WordExport in our Vol 4 release. Now all these export features are shipped with Grid.Grouping.Web assemblies itself, gridconverter.web assemblies are not required, which makes the process more easier.
Could you please upgrade to our latest Vol 4 release (6.4.0.15) and try the ExcelExport? You can Download the version from the below link:
http://www.syncfusion.com/downloads/latestversion/default.aspxOnce if you installed it, the samples will be loaded on the disk, in the following location:
C:\Documents and Settings\{User Name} \My Documents\Syncfusion\EssentialStudio\6.4.0.15\Web\grid.grouping.web\Samples\2.0\ExportingAndPrinting\Export\CS
Please have a look at this, and let us know if this helps you out.
Regards,
Raji