We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

System.Globalization.CultureNotFoundException is thrown from SheetRender ctor

Hi.
I’m using Aspose.Cells 8.6.3 for .NET

Here’s the code:

var workbook = new Workbook(filePath);
var options = new ImageOrPrintOptions
{
ImageFormat = System.Drawing.Imaging.ImageFormat.Tiff,
HorizontalResolution = 200,
VerticalResolution = 200
};

var pageCount = workbook.Worksheets.Sum(s => new SheetRender(s, options).PageCount);

Here’s the result:
System.Globalization.CultureNotFoundException: Culture is not supported.
Parameter name: culture
64537 (0xfc19) is an invalid culture identifier.
at System.Globalization.CultureData.GetCultureData(Int32 culture, Boolean bUseUserOverride)
at System.Globalization.CultureInfo.InitializeFromCultureId(Int32 culture, Boolean useUserOverride)
at □□□.□□□…ctor(□□□ , String , Boolean , Int32 )
at □□□.□□□.□□(Char[] , Int32 , Int32 )
at □□□.□□□…ctor(□□□ , String )
at □□□.□□□.□□□(String , □□□ )
at □□□.□□□.□□□(String , Boolean )
at □□□.□□□.□□□(String , Boolean )
at Aspose.Cells.Cell.□□□(Cells , Style , □□□ , Int32 , Boolean )
at □□□.□□□.□□□()
at □□□.□□□.□□□()
at □□□.□□□.□□□(Worksheet )
at □□□.□□□.□□□(Int32 )
at □□□.□□□.□□□(Worksheet , ImageOrPrintOptions )
at Aspose.Cells.Rendering.SheetRenderctor(Worksheet worksheet, ImageOrPrintOptions options)

I’ve attached the file that causes this problem

Hi,

Thanks for your posting and using Aspose.Cells.

Please download and try the latest version:
Aspose.Cells for .NET 8.7.1 it does not generate any exception with the code and sample excel file provided by you.