Created attachment 32214 [details] Input FIles We are facing a issue when we are trying to convert an excel file with below values to csv file. Cell value : 3E-104 5E-104 5E-106 All the above values are getting converted to 0 , in a csv . Cell format in MS Excel is 'General' Java code used for the conversion DataFormatter formatter = new DataFormatter(true); String fmtCellValue = formatter.formatCellValue(cell); I am attaching the sample of excel file. Versions tested : POI - 3.9, 3.10-Final, 3.10.1, 3.11-beta3
Hi, Any update on this issue?
Can you post your code? Preferrably as simple unit-test, so we can reproduce. I tried quickly, but could not reproduce your problem with the sample file given.
I could reproduce it now, FYI, POI internally does the following, which fails for such small numbers: DecimalFormat format = new DecimalFormat("#.##########", new DecimalFormatSymbols(Locale.getDefault())); double d = 3.0E-104; assertEquals("3.0E-104", format.format(d));
This seems to have been fixed with some previous change, maybe changes for bug 58471 made it work. I have enabled the previously disabled unit test via r1722666 to verify that it works now.