On Thu, 12 Dec 2013, Aram Mirzadeh wrote:
On 12/11/2013 11:12 PM, Nick Burch wrote:
Commenting out the cell.setCellType(Cell.CELL_TYPE_NUMERIC); does indeed
fix the problem.
Why are you calling setCellType(Cell.CELL_TYPE_NUMERIC) on the cells?
Generally this isn't needed - if reading you want the type the cell already
has, if writing you normally let POI set the type when you set the value
I'm writing, but POI is setting some of them to general when they are in fact
numeric. But either way the resulting behavior isn't expected right?
Cell Type != Cell Formatting
Cell Type is a low level thing about how it gets written to the file. Cell
Formatting is about how a number gets turned into soemthing on your screen
General is one of the well known formattings. If you want a different
formatting applied, create a cell style, set the format on that (could be
another well known one), and apply that cell style
Nick
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]