0

The number in the excel was 1.6741, but when i click on cell it is showing as 1.6741000000000001. Several cases are like that, but curiously not all. Some are correctly showing.i found some solution which they are saying convert from double to string and print as it is, but this cell value using in other cell as formula so it will not work.

Apache POI: version No:4.0.1

  • Possible duplicate of [How to remove decimal values from a value of type 'double' in Java](https://stackoverflow.com/questions/19060406/how-to-remove-decimal-values-from-a-value-of-type-double-in-java) – andrewdleach Nov 11 '19 at 15:25
  • Possible duplicate of [Is floating point math broken?](https://stackoverflow.com/questions/588004/is-floating-point-math-broken) – XtremeBaumer Nov 11 '19 at 15:34
  • Please show the used code which produces this issue. But `Excel` will **never** show `1.6741000000000001` when you click on the cell since it **always** only takes 15 significant digits in a number. – Axel Richter Nov 11 '19 at 15:34
  • 1
    Unless the cell is formatted as text. In that case `1.6741000000000001` is also shown by excel. Though then excel doesn't show `1.6741` – XtremeBaumer Nov 11 '19 at 15:36

0 Answers0