Can not find TXO content when opening a workbook in Cells for Java

Can you please tell me what is the meaning of the error "com.aspose.cells.CellsException: Can not find TXO content" that occurs when calling the Java method

workbook.open(excelFileName, com.aspose.cells.FileFormatType.EXCEL2003);

Thank you for your assistance

We get the same error when we call

workbook.open(excelFileName, com.aspose.cells.FileFormatType.DEFAULT);

As we continue to test, we are seeing that this does not happen with all files that we try to read, only some. Please let us know what the error message indicates.

Thanks.

Hi,

Could you post/attach your template file here, we will check it soon.

Thank you.

I sent the file just now via email, please let me know that you have received it.

Thanks.

Hi,

Thanks for providing us the template file, we have received it.

We found the issue as you have mentioned, we will figure it out soon.

Thank you.

Hi,

I have been able to isolate the problem to one of the charts on sheet 1.

Here is some background information: we are using the version of Aspose for java that is 910kb in size.

When we upgraded to the most recent Aspose, 1164 kb, we found that when uploading an Excel2007 file we got errors that specifically said it could not read a chart (Note that the file that had errors is not the same file that I sent to you today, and the error message was not the same error message as "Can not find TXO content" that we are getting today). We rolled back to the 910kb and no longer saw the error for that file.

Today we are back to using the 910kb version of Aspose.Cells for Java. The file I sent today is excel2003. When I convert it to excel2007, it is read succssfully by Aspose. However the conversion to excel2007 reports some errors and does some renaming of things so it is not a very good test.

So it seems that the 1164kb version of Aspose has issues with charts in Excel 2007. The 910kb of Aspose has issues with charts in Excel2003.....

We are now seeing the same error in a workbook without any charts. We are looking further into this document to isolate which sheet causes the error.

Hi, I think I was mistaken earlier when I thought a chart was causing the problem. I sent you an email with 3 more excel files, smaller and simpler files, that show the "Can not find TXO content". We now think it has to do with the sheets that have binary data in it.

Thanks.

We have been able to verify that charts are not the culprit for the problem that we are describing. Instead, we believe that the problem is caused by malformed cell comments in a worksheet.

To be more precise, the cell A1 in the worksheet “FDSCACHE” contains a comment which contains binary data instead of text data. This data is entered by a third party application from the market-data provider Factset which is used to import market-data into the spreadsheet. We cannot remove the worksheet nor can we remove the comment for cell A1.

Instead, we are wondering whether you can make your library aware of the possibility of binary data in a cell comment and just ignore the data. We are not interested in the data in the comment nor are we interested to read the worksheet “FDSCACHE”.

Is there a way for us to open a workbook without reading the contents of the worksheet “FDSCACHE”?

Hi,

We have received 3 more files, thanks.

We appreciate your efforts to tracing down the issue.

We will figure out the issue and get back to you soon.

Thank you.

Hi,

Please try the attached version fix (V2.1.0.18 for JDK1.5), we have fixed the issue of reading comments with binary data.

Thank you.

The V2.1.018 for JDK1.5 resolves the issue where there are comments with binary data.

However this version presents other problems when uploading excel 2007. Some files give us this error:


java.io.IOException caught: java.io.IOException: It is not a valid excel2007 file.chartSpace root element error

We do not see this error when uploading the same file to Aspose.Cells for Java 1.5 V 2.0.0

Can provide a jar that fixes both issues?

I will email the sample excel2007 that produces the chartSpace root element error.

Thank you

Hi,

We have received your template xlsx file, thanks.

I have found the issue (as you have mentioned) after an initial test, we will figure it out soon.

Thank you.

Hi,

Thank you for considering Aspose.

Please try the attached latest version of Aspose.Cells. We have fixed your mentioned issue.

Thank You & Best Regards,

Hi,

Which issue this patch is supposed to fix? (Aspose for JDK1.5 V2.1.0.19). We have two outstanding issues and this patch fixes neither of them:

1. Error "chartSpace root element error" when uploading an Excel 2007 file that we sent to you.

2. Null Pointer error in a file titled "MA model_postQ2 v1_Jovus.xls" which is the most recent file I sent.

Please clarify.

Thanks

Hi,

Thank you for considering Aspose.

The provided fix has fixed your mentioned issue regarding “Error chartSpace root element error when uploading an Excel 2007”. I checked your provided template file and it works fine with the provided latest fix. Please make sure that you have replaced the old jar with the newly provided jar. Also, you can check the version of the Jar which you are using by using the following API,

CellsHelper.getReleaseVersion();

Thank You & Best Regards,

Hi,

Moreover, the fix (v2.1.0.19) Nausherwan sent you recently only fixes the first issue.

For your second issue: Null Pointer error in a file titled “MA model_postQ2 v1_Jovus.xls” which is the most recent file I sent.
Please continue to check and follow the other thread: <a href="https://forum.aspose.com/t/71270 Hopefully, we will soon provide a fix which will resolve your both mentioned issue.

Thank you and have a good day!

Hi,

Thanks very much for the clarification. We will test the fix that is in.

Hi,

Thanks for the tip on detecting the version of Aspose in use. We now log the version when the application starts up.

With v2.1.019 we are still getting the error "java.io.IOException: It is not a valid excel2007 file.chartSpace root element error
at com.aspose.cells.Workbook.open(Unknown Source)"

I will send you the file that fails.

Thanks.