Retain formatting of a Double value - Java

前端 未结 3 1851
执念已碎
执念已碎 2021-01-23 04:37

I am using Poi to create Excel workbooks in Java. My raw data comes in as a string. I need to format the data to enter two decimal places into the cell where the number is bei

3条回答
  •  一生所求
    2021-01-23 05:10

    It appears we are at an impasse. As Mario pointed out, doubles are managed as binary and there is no way to format the binary as a double, except to convert it to a string with DecimalFormat, which is no longer a double. I explained this to my boss and he's ok with the solution of taking the raw double, so I'm closing this issue. Thanks to all for your help and support.

    regards, Mike

提交回复
热议问题