Hi
I am writing data to excel sheet using POI
Now when i am trying to write the BigDecimal value to a cell using following code
where
partBean.getBestBuyFactor()
is a BigDecimal value 1 but it is getting written to the cell as 1.000
because POI is treating it as a
text
and not as
number
so i tried setting the cellType as
cell.setCellType(Cell.CELL_TYPE_NUMERIC);
but still POI is treating it as a
string.
So can any one please help me why this is happening and how to resolve it?
I am attaching the screenshot of the excel sheet data.
Thanks in advance
Prashant