poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dale Monti" <dmo...@linoma.com>
Subject Re: Applying HSSFDataFormat to a value.
Date Tue, 22 Jun 2004 14:51:24 GMT
After some digging I found the following class that was helpful.
src\contrib\src\org\apache\poi\hssf\contrib\view\SVTableCellRenderer.java

----- Original Message ----- 
From: "Dale Monti" <dmonti@linoma.com>
To: "POI Users List" <poi-user@jakarta.apache.org>
Sent: Monday, June 21, 2004 2:50 PM
Subject: Applying HSSFDataFormat to a value.


Hi,
I am reading a spread sheet and would like to display the formatted cell the
same way it appears in Excel. For example in Excel the value appears as
$30.00.

HSSFCell cell
HSSFDataFormat format = book.createDataFormat();

I use cell.getNumericCellValue() which returns 30.0 and
format.getFormat(cell.getCellStyle().getDataFormat()) which returns
($#,##0.00);($#,##0.00)

How to I put them together to get $30.00 ?

I would really appreciate a response, even if the response is 'you can't do
that'.

Thanks in advance


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


Mime
View raw message