XLSX, XLSB discrepancy with

Reading getStringValueWithoutFormat from the attached xlsx gives “2013” for each cell.
Doing the same for the xlsb gives the value “2013.0”.

The cell values were originally defined as references to calculated cells.

testdata.zip (14.6 KB)

@james.clark,

We were able to observe the issue but we need to look into it more. We have logged the issue in our database for investigation and for a fix. Once, we will have some news for you, we will update you in this topic.

This issue has been logged as

CELLSJAVA-42674 - Different values returned by getStringValueWithoutFormat for XLSB and XLSX

@james.clark,

We have looked into this issue further and found that in int_test.xlsb, the value of A1 is saved as double and for double value, we just return Double.toString() value as result for Cell.getStringValueWithoutFormat(). For Java, it does not trim the decimal part even though it is zero and for performance, we do not check this at our end either. If you need to use to use integer value for such of values for this special situation, you should check double value yourself instead of using Cell.getStringValueWithoutFormat(). We hope this clarifies the reason of this issue.

Many thanks for the quick response.

We were previously using version 8.5.2 and only saw this issue when we recently upgraded to 18.6. Are you able to pinpoint when this issue this change to XLSB double handling occurred?

@james.clark,

We are investigating this issue and will share our feedback when available.

@james.clark,

We tested some older versions with int_test.xlsb and found that versions prior to 17.8 cannot load it successfully. How can you get the expected results with 8.5.2 and with the same template file? Do you use some other file, please elaborate.

Agreed I get the same.

int_test.xlsb is a cut down version of another xlsb file that can be read successfully with older versions of aspose cells.
Reading the that whole file yields “2013” for these double cells.

I can’t post that original file here as it contains sensitive data.

A bit of a catch-22.

@james.clark,

As we told you, in XLSB file format, the numeric values are stored in decimal and we just get the same value via the latest APIs set. It might be possible in older version, we used to trim the decimal part a bit. I am afraid, this is not an issue with the product. In newer versions, we do not trim decimal part on performance grounds simply, so I am afraid, you have to trim decimal part by yourselves if you want to do.

Yes I understand the fix and we have applied it.
I was hoping to understand when the change behaviour occurred but that’s not critical so we can close the issue.

Thank you for your help.

@james.clark,

Thank you for the feedback and you are welcome to ask any other query related to Aspose.Cells.

The issues you have found earlier (filed as ) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by MuzammilKhan