Free Support Forum -

Error in opening a complex workbook: Index out of range error

I have encountered a problem opening an Excel 97-2003 workbook containing 20 embedded OLE documents using the Java Aspose.cells library v2.1.0

Searching these forums, there appeared two similar issues in 2005 and 2007. Unlike those, I am unable to provide the offending document.

This problem occurs with the .open() method of Workbook using either the InputStream or the String Filename. Dozens of similar documents process with no problems whatsoever.

The .Net solution I am also evaluating that performs the same function was able to open and process this particlar xls file perfectly.

As a test, I opened this document in OpenOffice and saved as Excel97-2003 format. This saved version processed correctly in the Java code.

I understand that if you do not already have some criteria I could look for in the failing document, you would need an example. Before attempting to create such an example, I wanted to make sure this was not a known issue in the latest version of Aspose.Cells for Java.

Thank you for your attention,
Eric Anderson

Hi,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for considering Aspose.

Well, we will appreciate it a lot if you can share your template file with us. As your template file has some confidential data, so you may make this thread as private by checking "Keep this post as private" checkbox at the bottom when replying to the post, thus only Aspose staff and you, would be able to see your attachments.

Alternatively, you may post your template file(s) directly to us via email, so we can resolve your issue asap. To email please follow these under mentioned steps,

1: click the Contact button in the Post.

2: In the drop down list options click "Send nausherwan.aslam an Email”.

3: Attach the template file and send it.

4: Once you have done it, kindly confirm us on this thread.

Thank You & Best Regards,

After some effort, I was able to isolate the offending portion of the original document that cannot be shared.

I have created a new Excel 97-2003 Workbook using MS Office 2007.
It contains a hyperlink that points to the workbook file itself.

This fails to open when I use the following code:
InputStream inXls
Workbook wbk = new Workbook();,FileFormatType.DEFAULT);

I have uploaded this small file that fails to open with the Exception:
“String index out of range: -657276214”

Hi,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for considering Aspose.

We have found your mentioned issue after an initial test using your provided template file. We will look into it and get back to you soon.

Thank You & Best Regards,

Hi,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for considering Aspose.

Please try the attached latest version. We have fixed your mentioned.

Thank You & Best Regards,

This version fixes the problem we are experiencing. Thank you for such a fast turn-around!

Eric Anderson

The issues you have found earlier (filed as 10105) have been fixed in this update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.