Created attachment 28604 [details] File demonstrating the bug In an excel sheet processed through poi, getNumericCellValue() returned an incorrect result for a decimal value. The file is attached. The issue happens with the "Quantity" field of the first second row (-23,530.9150). Value in .xls file: -23,530.9150 Formatting: Category - Number, Decimal Places - 4, Use 1000 separator - True Value returned by getNumericCellValue: -23530.915000000045
getNumericCellValue() returns the number stored in the file, which is a floating point. If you want a string that looks the same as excel shows, use something like DataFormatter to format your number
Ok, the actual value in the field seems to be -23530.915, which is why I wondered why getNumericCellValue() returned -23530.915000000045. Any thoughts?
(In reply to comment #1) > getNumericCellValue() returns the number stored in the file, which is a > floating point. If you want a string that looks the same as excel shows, use > something like DataFormatter to format your number Ok, the actual value in the field seems to be -23530.915, which is why I wondered why getNumericCellValue() returned -23530.915000000045. Any thoughts?
http://en.wikipedia.org/wiki/Floating_point
have you tried using http://poi.apache.org/apidocs/org/apache/poi/ss/util/NumberToTextConverter.html?