poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karl-Heinz Zengerle" <karl-heinz.zenge...@sawag.com>
Subject WG: AW: HSSFCell - setCellValue("1.2") leads to a numerice value 1,2 in Excel
Date Wed, 31 Mar 2004 13:48:39 GMT
Hi Sri.

Using POI it's not the easy way like directly in Excel. I see the prime
(') everywhere. When copying the value it's still interpreted as 1,2 and
then displayed like date and time.

Regards,	Karl-Heinz.


-----Ursprüngliche Nachricht-----
Von: Karl-Heinz Zengerle [mailto:karl-heinz.zengerle@sawag.com] 
Gesendet: Mittwoch, 31. März 2004 14:50
An: 'POI Users List'
Betreff: AW: AW: HSSFCell - setCellValue("1.2") leads to a numerice
value 1,2 in Excel

Hi Sri.

So it seems to be the only way: Prefixing with "'" if there's not
already one there. I thought such safety measures would already be used.

Regards,	Karl-Heinz.


-----Ursprüngliche Nachricht-----
Von: Srinadh Karumuri [mailto:skarumur@bbn.com] 
Gesendet: Mittwoch, 31. März 2004 14:37
An: POI Users List
Betreff: Re: AW: HSSFCell - setCellValue("1.2") leads to a numerice
value 1,2 in Excel

Try a single quote in the front.

It's probably the nature of the gaint. When I tried 1.2 & '1.2 in Excel 
it behaved differently.

HSSFCell - setCellValue("'1.2")

-Sri

Karl-Heinz Zengerle wrote:

>Hi world.
> 
>Even
> 
>oCS.setDataFormat(HSSFDataFormat.getBuiltinFormat("@"));   // text
> 
>doesn’t help (where oCS is the reference to the cell style.
> 
>This is a double forcing of being a string and still ignoring it.
> 
>Regards,           Karl-Heinz.
> 
> 
>-----Ursprüngliche Nachricht-----
>Von: Karl-Heinz Zengerle [mailto:karl-heinz.zengerle@sawag.com] 
>Gesendet: Mittwoch, 31. März 2004 12:55
>An: poi-user@jakarta.apache.org
>Betreff: HSSFCell - setCellValue("1.2") leads to a numerice value 1,2
in
>Excel
> 
>Hi world.
> 
>Does anybody know how to avoid the problem above?
> 
>I’ld expect that when a string is written the resulting cell should be
a
>string.
> 
> 
>MfG 
>Karl-Heinz Zengerle
> 
>
>  
>




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


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