We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Cell.getStringValueWithoutFormat() outputs large numbers incorrectly in scientific notation

Hi - I see some similarity with StringValue/DisplayStringValue converting Text to Scientific Notation, but we have a customer who is using our product which uses Aspose.Cells to get raw text out of Excel documents.

In this instance for any cell type which is numeric, we output it as follows:

    if (cell.getType() == CellValueType.IS_NUMERIC)

However they are seeing 4.265525E8 rather than 426,552,500 and 6.80792319E8 instead of 680,792,319 which is not desirable for our use-case.

I would expect getStringValueWithoutFormat() to output the number without scientific formatting like this. If this is not correct, can you suggest the right code please to get the raw number?

Here is an example Excel file which exhibits this issue.

sample-excel-file.zip (1.5 MB)

It seems that you are using some older version of the product. Please try following sample code with the latest version v20.10 and share the feedback.

 Workbook workbook = new Workbook("DYNEGY-ICE VOL Jun5.xls");
 Cell cell = workbook.getWorksheets().get(0).getCells().get("C8");