https://bz.apache.org/bugzilla/show_bug.cgi?id=58966
[email protected] changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|INVALID |--- --- Comment #6 from [email protected] --- Ok, Indeed, I didn't get that DataFormatter was provided by POI. But when I am doing this now : XSSFSheet sheet = workbook.getSheetAt(1); final Iterator<Row> rowIterator = sheet.iterator(); Cell cell; while (rowIterator.hasNext()) { final Row row = rowIterator.next(); ... cell = row.getCell(col, Row.RETURN_BLANK_AS_NULL); DataFormatter df = new DataFormatter();//same with DataFormatter(true) org.apache.poi.ss.usermodel.CellValue cv = evaluator.evaluate(cell); String val = df.formatCellValue(cell, evaluator); ... } I still get val that is equal to 2734111.4155508447 In https://poi.apache.org/apidocs/org/apache/poi/ss/usermodel/DataFormatter.html, it says that the default format for decimal numbers is "#.##########", but it I can't reproduce that. Or should I use a different code than the one above to use DataFormatter ? I also tried (new java.text.DecimalFormat("#.##########")).format(cell.getNumericCellValue()) but it gives also 2734111.4155508447 instead of 2734111.41555084 on Excel. -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
