The change-log on the Apache POI website suggests that the HSSFDataFormatter 
class should be included in the latest release - 3.1 final; I am downloading it 
now and will have a look. If I find the formatter class, I will post again here.

--- On Wed, 10/15/08, Anthony Andrews <[EMAIL PROTECTED]> wrote:
From: Anthony Andrews <[EMAIL PROTECTED]>
Subject: Re: How to get cell value general type as it is?
To: "POI Users List" <[email protected]>
Date: Wednesday, October 15, 2008, 11:59 PM

Oh! Will have a look today.

--- On Wed, 10/15/08, geek.shrek <[EMAIL PROTECTED]> wrote:
From: geek.shrek <[EMAIL PROTECTED]>
Subject: Re: How to get cell value general type as it is?
To: "POI Users List" <[email protected]>,
[EMAIL PROTECTED]
Date: Wednesday, October 15, 2008, 3:09 PM

Thanks Anthony,

I saw it in API, but I couldn't find it anywhere in the poi jar (neither
poi-3.1 or contrib or scratchpad).

How did you use this class?


Thanks,






----- Original Message ----
From: Anthony Andrews <[EMAIL PROTECTED]>
To: POI Users List <[email protected]>
Sent: Wednesday, October 15, 2008 6:03:57 PM
Subject: Re: How to get cell value general type as it is?

Sorry to say that I am not at my PC so do not have any code to hand to
demonstrate but I would advise you to take a look at the HSSFDataFormatter
class. Most likely, you will want to use one of the formatCellValue() methods.

--- On Tue, 10/14/08, geek.shrek <[EMAIL PROTECTED]> wrote:
From: geek.shrek <[EMAIL PROTECTED]>
Subject: How to get cell value general type as it is?
To: [email protected]
Date: Tuesday, October 14, 2008, 8:18 PM

Hi,

I wonder how can I have the cell value just the way it is?

For example if I have the whole worksheet as general type and the cell value
for example "2" or "1234", if I get it as a string it will
become "2.0" or "1234.0"
I need to get the cell value just like the user type on it. For example if the
user typed "2" i will get "2" instead of 2.0 and if the
user
type "2.0" i will get "2.0"

I also try to set my xls as "text type" but it still adding
".0" at the end.

Is it possible to have the number just the way I see it in xls?

I hope I explain my problem clearly.

Thanks,


      


      


      

Reply via email to