Exception on call to OpenDocument(stream): Specified argument was out of the range of valid values


#1

Laurence, I have a relatively small Excel file that is read into a byte[] array, wrapped in a MemoryStream and then passed to Workbook's OpenDocument method. Aspose.Cells version 3.9.0.1 throws an exception ("Specified argument was out of the range of valid values").

I am unable to determine why. I am pretty sure that I have narrowed things down to one of 3 columns, all General formatting -- with one column that contains email addresses.

Can I send this to you under NDA? And/or you could send me a DLL that will display additional diagnostic information. Thanks.


#2

Please try this attached version.

If it doesn't work for you, please send your NDA to nanjing@aspose.com, I will sign it.


#3

Laurence, I am still getting this exception: "System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values." (at Aspose.Cells.Hyperlinks.Add(Int32 firstRow, Int32 firstColumn, Int32 rowNumber, Int32 columnNumber, String address))

have attached a ZIP file with a small test method and 3 very tiny Excel files. I'd like to understand what is wrong with the file named "AsposeCannotReadThisStream.xls" and HOW a user could edited the file to make it unreadable by Aspose (but readable by Excel 2003).

I believe the problem is in A2.

Thanks for your help!


#4

I will check and fix this issue ASAP.


#5

Please try this fix.


#6

Excellent! This DLL does not throw the exception.

Can you help me to understand why 2 third-party Excel "repair" utilities thought that the one file is corrupt (but were able to repair it) and yet Excel was able to open the file without any warnings, errors, or problems?

What change did you make to Aspose.Cells?

Thanks for the additional info.


#7

I find a small bug in importing hyperlinks and fixed it.

The files created with Aspose.Cells is a little different with MS Excel created files. But we will make sure they can be opened successfully in MS Excel.