You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by fr...@ing.be on 2005/06/14 09:16:31 UTC

RE : HSSF: output 0.0459 to excel file to see 4.59%

I guess you already checked that you weren't inserting a String, but an float...
Because if you insert a String, you don't get the formatting.
(Sorry if this sounds stupid, but I had the problem once).


>___________________________________________________
>
Frédéric Ferrant



-----Original Message-----
Hi guys,
I read a formatted Cell in an Excel file, then put a value in the Cell with
the .setCellValue(variableName)  where variableName contains the value "0.0459"
and  save the HSSF file. However when I open the saved file i see 0.0459
although the style of the cell it is displayed on is a percentage 0.00##%.
Any ideas how to "preserve the cell style" ? ?

__________
Disclaimer: This e-mail is intended for the exclusive use by the
person(s) mentioned as recipient(s). This e-mail and its attachments,
if any, contain confidential information and/or information protected
by intellectual property rights or other rights. This e-mail
does not constitute any commitment for ING or its subsidiaries except when
expressly otherwise agreed in a written agreement between the
intended recipient and the originating subsidiaries of ING, sender of
the mail.
If you receive this message by mistake, please, notify the sender
with the "reply" option and delete immediately this e-mail
from your system, and destroy all copies of it. You may not, directly
or indirectly, use, disclose, distribute, print or copy, this e-mail
or any part of it if you are not the intended recipient.
You have to take at any time all necessary measures against viruses.

---------------------------------------------------------------------
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/


Re: RE : HSSF: output 0.0459 to excel file to see 4.59%

Posted by Oytun Askin <oy...@gmail.com>.
Good thought but I am getting these fields from a query from a MS Access table 
that is NOT string. i put the " "'s in to indicate what i saw. that might have 
been misleading. 

Thanks 
<frederic.ferrant <at> ing.be> writes:



---------------------------------------------------------------------
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/