Hi Dale.
It's something similar to
oCS.setDataFormat(oFmt.getFormat("dd.MM.yyyy"));
(just adapted to your format; numbers we didn't have to format up to
yet).
So you just should replace my date format above by your number format
below.
Regards, Karl-Heinz.
-----Urspr�ngliche Nachricht-----
Von: Dale Monti [mailto:[EMAIL PROTECTED]
Gesendet: Montag, 21. Juni 2004 21:51
An: POI Users List
Betreff: 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]