Thank you for your comment but it is not a problem of format.

I have a number about fourteen million, and we use the default format.

If you check the value of the cell when is open in a bad way you only can see the first digit, i.e. "1". The format string of the cell is something similar to #.###.

If you open the file using doble-click from the Windows Explorer the value is ok. If you save the file using Excel, next time you open the file everything is ok. It doesn't matter the way you open it. *So Excel saves the cell in a different way that POI did it*.

It seems that the problem could be related to the type of thousands and decimal separator i have defined in my operating system.




On 30/09/16 14:27, Nick Burch wrote:
On Fri, 30 Sep 2016, Fende wrote:
I use POI library to create xlsx files using the class XSSFWorkbook. If i open the created file with double-click using "Windows Explorer", ...

If you want Excel to display a number in a certain way, eg ensure a certain number of digits are shown, then you need to create a cell style with that formatting, and apply it to the cells. Relying on Excel to magically pick the right format is error prone at best

http://poi.apache.org/spreadsheet/quick-guide.html#DataFormats

Nick

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@poi.apache.org
For additional commands, e-mail: user-h...@poi.apache.org


Reply via email to