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

Free Support Forum - aspose.com

ArgumentOutOfRangeException when opening workbook

I have a spreadsheet that can't be opened by Aspose.Cells (4.4.0.0). The code looks like this:

Aspose.Cells.Workbook workbook = new Aspose.Cells.Workbook();

workbook.Open(filename);

I get ArgumentOutOfRangeException. Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: startIndex

Here is the call stack:
at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
at System.BitConverter.ToInt16(Byte[] value, Int32 startIndex)
at System.BitConverter.ToUInt16(Byte[] value, Int32 startIndex)
at Aspose.Cells.RW.x759e96d7f1e41a9d.x9a9374d9b481a27b(ArrayList x6f86ac105028db63, Worksheets x6d7b41a5fb54bb38)
at Aspose.Cells.RW.x8b6071c5dcbbf539.x9a9374d9b481a27b(x508b33aea0611cd1 xcf18e5243f8d5fd3)
at Aspose.Cells.RW.x8b6071c5dcbbf539.x533dee58d7fff4e6(x508b33aea0611cd1 xcf18e5243f8d5fd3)
at Aspose.Cells.RW.x8b6071c5dcbbf539.x6b024d3b2b8f9765(MemoryStream xcf18e5243f8d5fd3)
at Aspose.Cells.RW.x8b6071c5dcbbf539.x6f3d999f7a817f2d(xd8c3135513b9115b x84378c276c4cd7e2)
at Aspose.Cells.RW.x8b6071c5dcbbf539.x06b0e25aa6ad68a9(String xafe2f3653ee64ebc)
at Aspose.Cells.Workbook.Open(String fileName)
at WindowsApplication2.Form1.button1_Click(Object sender, EventArgs e)

Hi,

Kindly post your templat file, we will check it soon.

Thank you.

I got your file and fixed the problem in attached version. Please try it.

I have the same problem.

Please check the attached file

Hi alias,

Have you tried above attached fix? We don't find problem with your file.

Laurence,

Thanks for the fix. However, I have another file that gives the same problem on 4.4.0.35 - I have emailed it to nanjing@aspose.com (sent Jan 31 15:44).

I would appreciate if you could investigate this one.

Thanks,

Dan

Hi Dan,

Thanks for sending the template file.

We will check it soon.

Thank you.

I got you file. Please try this attached version.