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

Error when trying to export to excel

Thread ID:





77287 Oct 23,2008 05:18 PM UTC Nov 1,2008 02:18 AM UTC ASP.NET Web Forms (Classic) 3
Tags: GridGroupingControl
Asked On October 23, 2008 05:18 PM UTC


We are using Essential Studio v. When I try to export the grid data to excel I am getting an error "Font.Size out of range. Size must be less then 409 and greater than 1.
Parameter name: Font.Size
Actual value was 0.". Please find the attached file for more details. The following code I used for export task.

GroupingGridExcelConverterControl ggExcelConverter = new GroupingGridExcelConverterControl();
ExcelEngine excelEngine = new ExcelEngine();
IApplication application = excelEngine.Excel;
IWorkbook myWorkbook = excelEngine.Excel.Workbooks.Create(2);
IWorksheet mySheet = myWorkbook.Worksheets[0];
//ggExcelConverter.AutofitColumns = true; // used to Autofit the Excel columns
//ggExcelConverter.AutofitRows = true; // used to Autofit the Excel rows
//ggExcelConverter.GroupingGridToExcel(myWorkbook,this.sgInventory, mySheet, ConverterOptions.Visible);
ggExcelConverter.GroupingGridToExcel(this.sgInventory, mySheet, Syncfusion.GridExcelConverter.ConverterOptions.Visible);
myWorkbook.SaveAs("Color.xls", ExcelSaveType.SaveAsXLS, Response, ExcelDownloadType.PromptDialog);

Please reply me ASAP.



Rajarajeswari S [Syncfusion]
Replied On October 24, 2008 07:33 AM UTC

Hi Rafiq,

Thanks for using Syncfusion products.

With version, 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:


In 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:

GridExcelExport excel = new GridExcelExport(this.GridGroupingControl1, "excel.xls");

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 ( and try the ExcelExport? You can Download the version from the below link:


Once 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\\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.


Perry Way
Replied On October 30, 2008 08:43 PM UTC

Hi Raji,

When I tried using v6.3.1.8 with the provided class files, It's not exporting data into excel if grid has summary row. But with no summary rows, its working fine.


Mohamed Suhaib Fahad A. [Syncfusion]
Replied On November 1, 2008 02:18 AM UTC

Hi Perry,

Thanks for the details.

Since this is a defect you have mentioned, I would like you to create a new DTrac incident for further follow up on this.

ASP.NET Grid Team
Syncfusion Inc.,


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

This page will automatically be redirected to the 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