System.IndexOutOfRangeException when initializing Workbook

Hi,

We use Aspose.Cells 7.2.2.2. We use it to export tables content to excel.

I get the following exception when the Windows' Region and Language is Hungarian:

<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>
Exception occured in
.ctor
===================
Exception Type : System.IndexOutOfRangeException
Printing full exception information:
--------------------------------------
Index was outside the bounds of the array.
Printing stack trace information:
------------------------------------
at ?.??..ctor(CultureInfo )
at ?.?.?e()
at ?.?.set_CultureInfo(CultureInfo )
at ?.?..ctor(CountryCode )
at Aspose.Cells.WorkbookSettings..ctor(Workbook , CountryCode )
at Aspose.Cells.Workbook..ctor()
at Mercury.TD.Client.UI.Components.ThirdParty.BaseTree.Export.Exporters.ExcelExporter.StartExport()
at Mercury.TD.Client.UI.Components.ThirdParty.BaseTree.Export.BaseTreeExportManager.Export(Boolean selected)
<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>

Is there a way to properly call the Workbook constructor so it won't fail when the application is running in Hungarian locale?

Hi Yaniv,

Thanks for your posting and using Aspose.Cells.

Please download and use the latest version: Aspose.Cells
for .NET v7.7.2.1
it should fix your issue.

I tested with the latest version after setting the regional language to Hungarian with the following code and it did not throw any exception.

If your problem still persists, then please provide us your sample code and source files if any replicating this issue with the latest version. We will look into it and help you asap.

C#


Workbook workbook = new Workbook();


Thanks for the quick response.

We use an older version and the license we have does not work with the latest version.

I get the following exception when trying to use it:

Exception occured in
.ctor
===================
Exception Type : System.TypeInitializationException
Printing full exception information:
--------------------------------------
The type initializer for 'Mercury.TD.Client.UI.Components.ThirdParty.BaseTree.Export.Exporters.ExcelExporter' threw an exception.
The subscription included in this license allows free upgrades until 02 Nov 2012, but this version of the product was released on 20 Feb 2014. Please renew the subscription or use a previous version of the product.

I'm checking with my managers about the status of our license renewal.

So my goal here was to see if i can make it work while using the old version (7.2.2.1)

Hi Yaniv,

Thanks for your feedback and using Aspose.Cells.

We are afraid, we cannot fix the bug in older versions so you will have to use and try the latest version. Kindly try the version after commenting your license code in evaluation mode and see if it fixes your issue.

If your issue still occurs, then please provide us a simple sample project replicating this issue with the latest version, so that we could look into this issue and fix it.

Once, the issue is fixed, you can renew your subscription so that you could use latest version in licensed mode.