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:[EMAIL PROTECTED]]
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" <[EMAIL PROTECTED]>
To: "'POI Users List'" <[EMAIL PROTECTED]>
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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to