We are using Aspose.Cells for Java version 7.3.4. We are trying to read a value in an Excel spreadsheet from a cell that has formatting of type “General” by calling cell.getStringValue() on that Cell. Values in this cell are typically numeric, but alpha characters are allowed as well.
When numeric values of over 12 digits in length are entered in this cell, for example: 1234567890709, the value displayed in the cell is in E notation: 123457E+12. I assume Excel does this formatting by default in “General” type fields?
Our issue is, when we read the cell using cell.getStringValue(), we are expecting to get “1234567890709”, but instead we are getting the formatted value “123457E+12”.
Is this cell.getStringValue() behavior we are seeing as-designed? If so, what are our options (if any) for getting the un-formatted value?
Thanks for your quick response and for explaining why this is expected behavior!
I’ll see if we can take the approach of setting the cell Style when we read the Cell.
Thanks for your posting and using Aspose.
If you face any other issue, please feel free to post on our forums, we will be glad to assist you further.