Carlos,

There is no integer "datatype" for excel, all numeric
values are stored as doubles. I suspect your problem
may have something to do with the cell format.

These may help you:
http://jakarta.apache.org/poi/apidocs/org/apache/poi/hssf/usermodel/HSSFData
Format.html

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

~ amol


> -----Original Message-----
> From: Carlos Bergueira [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, November 01, 2005 11:33 AM
> To: POI Users List
> Subject: Float value into Cell
> 
> 
> Hi All,
> 
> I really need to put a float value into a cell.
> 
> This is what I have done:
> 
> 
> 
> HSSFRow row = sheet.createRow( (short) currentNoOfExcelRows);
> 
> HSSFCell debit = row.createCell( (short) 1);
> HSSFCell credit = row.createCell( (short) 2);
> 
> debit.setCellValue(account.getDebit()); // get the debit from 
> database where
> datatype is float
> credit.setCellValue(account.getCredit()); // get the credit 
> from database
> where datatype is float
> 
> 
> 
> 
> The result is an integer value !
> Help is appreciated.
> Thanks.
> 
> --
> Cumprts,
> Carlos Bergueira
> 

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

Reply via email to