何鹏飞
2018-10-10 08:42:51 UTC
Hi all,
I use this code
CellValue cellValue = formulaEvaluator.evaluate(cell);
cellValue.getNumberValue();
to evaluate formula in xls. (POI version is 3.9)
and display value is 21.1, but parsed value is 21.099999999999998.
Can I get the same value with the display one ? (I know POI get the 'cached' value in xml, but excel display the different value based on the xml)
Also I want to scale 2 point . but the value will add two o. For example: 3 -> 3.00
please give me some advice.
Best regards£¬
marvin
I use this code
CellValue cellValue = formulaEvaluator.evaluate(cell);
cellValue.getNumberValue();
to evaluate formula in xls. (POI version is 3.9)
and display value is 21.1, but parsed value is 21.099999999999998.
Can I get the same value with the display one ? (I know POI get the 'cached' value in xml, but excel display the different value based on the xml)
Also I want to scale 2 point . but the value will add two o. For example: 3 -> 3.00
please give me some advice.
Best regards£¬
marvin