Bug while opening Excel 2013 file


Hello. We are have some issues while trying to open Excel 2013 files to be processed, using new Workbook(stream).
I include below the code we are using, and the exception thrown by Aspose.
Note: if we use an Excel 2010 file instead of an Excel 2013, it works like a charm.

File file = docRep.Download(_fileId);
System.IO.Stream stream = new System.IO.MemoryStream(file.BinaryContent);
resultValue = new Workbook(stream);

Exception thrown:
"Index was outside the bounds of the array."
at ž . .CellNameToIndex(String cellName, Int32& row, Int32& column, Boolean isInArea, Boolean& isRowAbsolute, Boolean& isColumnAbsolute, Boolean& isRowOnly, Boolean& isColumnOnly)
at ’’ . . ƒ (WorksheetCollection , String )
at ” . .Ž (XmlTextReader , )
at ” . .‹ (XmlTextReader )
at ” . .Read(XmlTextReader )
at ” .‡ .˜— ()
at ” .‡ .Read()
at ” .† . (Workbook )
at Aspose.Cells.Workbook. Ÿ (Stream , LoadOptions , Boolean )
at Aspose.Cells.Workbook..ctor(Stream stream)
at ...

Could you please help us??
Thanks

Hi,


Thank you for contacting Aspose support.

Please note, Aspose.Cells APIs support Excel 2013 file formats so there shouldn’t be a problem loading the Excel 2013 saved spreadsheet unless the file itself is corrupted or damaged. In order to look further into this matter, we need the actual problematic sample for our investigation so please share it here.

Looking forward to your kind response.

I attach the file that is causing problems.


Thanks.

Hi,


Thank you for sharing the sample.

We have evaluated the presented scenario while using the latest version of Aspose.Cells for .NET (Latest Version) and the following piece of code. I am afraid, we are not able to observe any exception while loading the shared sample or re-saving it with latest build of the API. Please give the latest version a try on your side to feed us back with your results. In case the problem persists, please also provide the details of your environment as follow.

  • Operating system version & architecture
  • Operating system service pack
  • Target .NET framework
  • System locale/region

C#

var stream = new MemoryStream(File.ReadAllBytes(filename));
var workbook = new Workbook(stream);
workbook.Save(“D:/resaved.xlsx”, SaveFormat.Xlsx);

We are using Aspose.Cells 7.2.0.0.

Could that be a problem??

Hi,


Yes, it appears that the problem is in your version of the API because the file seems to be fine when loaded with Excel application. Moreover, the latest build can process it so most probably it could be a bug in 7.2.0.0.

So, is it possible to solve that bug in 7.2.0.0, or we have no choice but upgrading to 8.6.0.5??

Hi,


Please note, we maintain single code base therefore it is impossible to fix a bug on the top of any previous release (as of v7.2.0.0). I am afraid, you have to upgrade the API to recent releases that have already resolved the said problem.

Adding more, v8.6.0.5 is a maintenance release and regardless of the fact that a maintenance release can be used in production, you should either upgrade to v8.6.0 or wait for a few days to get your hands on v8.6.1 that is scheduled for the upcoming week.