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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Error exporting grid to Excel

Thread ID:

Created:

Updated:

Platform:

Replies:

96450 Sep 14,2010 04:34 PM UTC Sep 17,2010 05:56 AM UTC General Discussion 4
loading
Tags: General Discussion
Grant Crofton
Asked On September 14, 2010 04:34 PM UTC

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)

Any ideas?

Thanks



Grant Crofton
Replied On September 15, 2010 10:32 AM UTC

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?


Jisha Joy [Syncfusion]
Replied On 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


Grant Crofton
Replied On September 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.


Jisha Joy [Syncfusion]
Replied On September 17, 2010 05:56 AM UTC

Hi Grant,

Glad to know that issue got resolved.

Regards,
Jisha


CONFIRMATION

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.

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

;