You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by uselessguy <an...@hotmail.com> on 2006/12/21 10:17:47 UTC

dataformat not getting applied in excel

when applying a format for a cell using the HSSF package of POI I come across
some behaviour which I cannot understand

consider the following to create a style for a number having 2 decimal
places

cellStyleNumber = wb.createCellStyle();
cellStyleNumber.setFont(normalFont);
cellStyleNumber.setDataFormat(hdf.getFormat("0.00"));

and I apply the style using 
cell.setCellStyle(cellStyleNumber);

when I open the excel sheet most of the cells have the format correctly but
2 cells dont
actual values are 112.346004986331 and 105.845444762428

if I check the dataformat of the corresponding cells in excel I dont see any
format applied

plz help coz I cant figure this out ... thnkx a million





-- 
View this message in context: http://www.nabble.com/dataformat-not-getting-applied-in-excel-tf2864471.html#a8004866
Sent from the POI - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/