The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
Hi, we're changing our build process over and we've started getting the following problem when exporting a grid to excel:
Error: Unable to cast object of type 'Syncfusion.Windows.Forms.Grid.Grouping.GridCaptionSection' to type 'Syncfusion.Windows.Forms.Grid.Grouping.GridCaptionRow'. Component: TraLibrary, Version=1.0.0.53, Culture=neutral, PublicKeyToken=null Source: Syncfusion.GridConverter.Windows OS: Microsoft Windows NT 5.2.3790 Service Pack 2
Call Stack: at Syncfusion.GroupingGridExcelConverter.GroupingGridExcelConverterControl.ExportElements(IList arrElements, IWorksheet sheet, Int32 index, ConverterOptions options, Int32 iGroupLevel) at Syncfusion.GroupingGridExcelConverter.GroupingGridExcelConverterControl.GroupingGridToExcel(GridGroupingControl grouping, IWorksheet sheet, ConverterOptions options) at Syncfusion.GroupingGridExcelConverter.GroupingGridExcelConverterControl.GroupingGridToExcel(GridGroupingControl grouping, String strFileName, ConverterOptions options) at Trafigura.Pluto.Forms.EstimatedCosts.frmEstimatedCosts.ExportToExcel() at Trafigura.Pluto.Forms.EstimatedCosts.frmEstimatedCosts.ToolBar1_ButtonClick(Object sender, ToolBarButtonClickEventArgs e)
Nothing's changed in the code, so I'm not sure what the issue is. We've had a lot of problems with Syncfusion licence files too (which have largely been resolved), but it doesn't appear to be related. The code to do it is simply:
Dim converter As GroupingGridExcelConverterControl = New GroupingGridExcelConverterControl
converter.GroupingGridToExcel(grdCosts, saveForm.FileName, Syncfusion.GridExcelConverter.ConverterOptions.Default Or Syncfusion.GridExcelConverter.ConverterOptions.Visible Or Syncfusion.GridExcelConverter.ConverterOptions.ColumnHeaders)
Looking further into this, it seems that one of the DLLs involved (Syncfusion.GridConverter.Windows.dll) is different with the new build than with the old one - although it's the same version, it's 4k smaller (48k vs 52k), and doing a binary compare of the assemblies shows differences.
Could it be the new build isn't performing some kind of licencing step which is supposed to upate this DLL to make it work?
JJJisha Joy Syncfusion Team September 15, 2010 12:30 PM UTC
Hi Grant,
Could you please let me know the Essential studio version you are using currently?.
Regards, Jisha
GCGrant CroftonSeptember 16, 2010 12:54 PM UTC
It's Ok, I just replaced the 48k DLl with the 52k one in the build and it works fine now. Not sure what the issue with the DLL was.
JJJisha Joy Syncfusion Team September 17, 2010 05:56 AM UTC