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

Maximum number of extended formats exceeded?

Hi,

When using

ExportToExcel() methodand specifying Excel97to2003 format as the excel version,from Syncfusion DataGridControl in WPF the System.ApplicationException listed below is thrown.

It works with Excel2007, Excel2010 options etc.

Is there a limit for how many rows to export to Excel 97-2003 file format?

My grid control has 1434 rows with 4 columns, plus ConditionalFormats defined for four different possible strings in the first column, things like:

<syncfusion:GridDataControl.ConditionalFormats>

<syncfusion:GridDataConditionalFormat Name="ExactMatch">

<syncfusion:GridDataConditionalFormat.Style>

<syncfusion:GridDataStyleInfo Background="Green" />

</syncfusion:GridDataConditionalFormat.Style>

<syncfusion:GridDataConditionalFormat.Conditions>

 

It is grouped on the first column only. This grid needs to handle up to the full amount of Excel rows

System.ApplicationException
{"Maximum number of extended formats exceeded."}

   at Syncfusion.XlsIO.Implementation.Collections.ExtendedFormatsCollection.Add(ExtendedFormatImpl format)
   at Syncfusion.XlsIO.Implementation.WorkbookImpl.RegisterExtFormat(ExtendedFormatImpl format, Boolean forceAdd)
   at Syncfusion.XlsIO.Implementation.CellStyle.EndUpdate()
   at Syncfusion.XlsIO.Implementation.ExtendedFormatWrapper.set_WrapText(Boolean value)
   at Syncfusion.Windows.Controls.Grid.Converter.GridExcelConverterBase.CopyAlignment(GridStyleInfo gridCell, IRange range)
   at Syncfusion.Windows.Controls.Grid.Converter.GridExcelConverterBase.CopyStyle(GridStyleInfo gridStyle, IRange destRange, Boolean IsAsyncExport)
   at Syncfusion.Windows.Controls.Grid.Converter.GridExcelConverterControl.GridCellToExcel(GridModel gridModel, Int32 row, Int32 column, IRange range, GridCellExportToExcelHandler exportingHandler, Boolean IsAsyncExport)
   at Syncfusion.Windows.Controls.Grid.Converter.GridDataControlExportExtensions.ExportToExcel(GridDataTableModel model, GridRangeInfo gridRange, IWorksheet workSheet, Int32 excelRow, Int32 excelCol, GridCellExportToExcelHandler exportingHandler, GridModelExportToExcelHandler modelExportingHandler, Boolean useExcelExpanderAndIndentColumn, Dictionary`2 rowDict, Dictionary`2 modelEventDict, List`1 lstModel, Int32& childCount, Int32& childModelCount, Boolean& isFirstGroupRow)
   at Syncfusion.Windows.Controls.Grid.Converter.GridDataControlExportExtensions.ExportToExcel(GridDataControl gridDataControl, GridRangeInfo gridRange, IWorksheet workSheet, IRange excelRange, GridCellExportToExcelHandler exportingHandler, GridModelExportToExcelHandler modelExportingHandler, Boolean useExcelExpanderAndIndentColumn)
   at Syncfusion.Windows.Controls.Grid.Converter.GridDataControlExportExtensions.ExportToExcel(GridDataControl gridDataControl, String fileName, ExcelVersion excelVersion, GridCellExportToExcelHandler exportingHandler, GridModelExportToExcelHandler modelExportingHandler, Boolean useExcelExpanderAndIndentColumn)
   at Syncfusion.Windows.Controls.Grid.Converter.GridDataControlExportExtensions.ExportToExcel(GridDataControl gridDataControl, String fileName, ExcelVersion excelVersion)
   at UserControl.Button_Click(Object sender, RoutedEventArgs e) in UserControl.xaml.cs:line 74


2 Replies

DA Divya A Syncfusion Team May 14, 2013 05:01 AM UTC

Hi Mark,

 

Sorry for the delay.

 

The exception with “Maximum number of extended formats exceeded” when exporting an GridDataControl has been fixed in our current source.

 

However, we do not provide confidential information and patches in the general forum.

 

You can also create an incident in our Direct trac account with the below link.

https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents

 

That would be helpful for us to provide you the patch through incident.

 

Please let us know if you need any further assistance.

 

Regards,

Divya.

 



DS Dan Soltesz October 22, 2014 02:57 PM UTC

I'm using version 12.1451.0.43 and this is still happening

Loader.
Live Chat Icon For mobile
Up arrow icon