poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "H@rry" <apache...@SoftHome.net>
Subject RE: How to get "12345" to be a real string?
Date Tue, 04 Feb 2003 05:37:49 GMT
I'm using 1.8.0 and
HSSFDataFormat.getBuiltinFormat("@") returns -1.

I set directly using this

	HSSFCellStyle cs = cell.getCellStyle();
      cs.setDataFormat((short)49);
      cell.setCellValue("12345");

All values entered in the cell will be treat as text...no matter wat you key
in.



-----Original Message-----
From: Calvin Cheung [mailto:calvin@quadbase.com]
Sent: Tuesday, February 04, 2003 6:17 AM
To: POI Users List
Subject: Re: How to get "12345" to be a real string?


Try using this:

HSSFDataFormat.getBuiltinFormat("@")

Calvin

----- Original Message -----
From: "Andy Lee" <aglee@earthlink.net>
To: "'POI Users List'" <poi-user@jakarta.apache.org>
Sent: Monday, February 03, 2003 2:07 PM
Subject: RE: How to get "12345" to be a real string?


> At 4:08 PM -0500 2/3/03, Charlat, Simon (Exchange) wrote:
> >I format the cell as text and it works.
> >cs2.setDataFormat(HSSFDataFormat.getBuiltinFormat("text"));
> >Simon.
> >
>
> What version of HSSF are you using?  For me,
>
>      HSSFDataFormat.getBuiltinFormat("text")
>
> returns -1.
>
> --Andy
>
> ---------------------------------------------------------------------
> 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