Mary-Ann

You will have to forgive me if this does not provide you with any new ideas at 
all but here goes.

I mostly use JExcel - it had support for images before HSSF and my client 
required that so we ran with JExcel - and it allows you to get at the value 
stored in a cell a copule of different ways. Firstly, there is a utility method 
that simply returns the value stored in any type of cell as a String. Secondly, 
there are methods that are specific to the cell type - Number, Date, Label, etc 
- that you can call to recover the value of a cell as an instance of a specific 
class - Date for instance. Have you looked through HSSF's javadoc to see if it 
mimics this sort of capability?

"Finnerty, Mary Ann (GE Healthcare)" <[EMAIL PROTECTED]> wrote: 
Not sure.  I posted an email about this, and got one response that
seemed to indicate that I'd need to write code to apply a format.  I'll
see what I can find out about HSSFDataFormat.

Thanks!  I'd love to be able to read the xls directly.

Maffy 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, September 06, 2006 2:54 PM
To: POI Users List
Subject: RE: AW: Reading numeric values as strings from a cell

Is this something that cannot be handled using HSSFDataFormat?

~ amol


--- "Finnerty, Mary Ann (GE Healthcare)"
 wrote:

> This is similar to what we're trying to do.
> 
> When I read the spreadsheet, it has numbers like:
> 100, 10000, 0.967,
> etc.
> When I read them using POI, I get 100.0, 10000.0, 0.97, etc.
> 
> We're doing a medical application, and we need the numbers eXACTLY as 
> entered into the spreadsheet to create our JUNIT tests for 
> verification and validation before we get to the next stage in the 
> delivery of our products.
> 
> Right now, I am just saving the xls as text, and parsing the text into

> XML.  I was hoping to get rid of a step by using POI, but I only seem 
> to be able to get the double value and not the value that was entered 
> into the spreadsheet (which represents the output produced by the 
> module being tested).
> 
> Maffy
> 
> -----Original Message-----
> From: Alex Mayorga Adame
> [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, September 06, 2006 1:21 PM
> To: [email protected]
> Subject: Re: AW: Reading numeric values as strings from a cell
> 
> 
> Maybe I didn't stated my question correctly. But by
> doing that on a Cell
> formatted as Date you'd probably end up with
> something like: 38966  even
> if in your Worksheet you see: 6-Sep-06
> 
> I would like to store the latter, the data as seen
> in Excel on a String.
> 
> Hope this clears up the confusion.
> 
> Thanks in advance,
> Alex
> 
> 
> Daniel Noll wrote:
> > 
> > Alex Mayorga Adame wrote:
> >> In short, there's a need to extract the contents
> of the cells as they
> 
> >> show on the worksheet, extracted as a string no
> matter what the Cell 
> >> number format is.
> >> 
> >> Any help would be highly appreciated.
> > 
> > We do this the trivial way, i.e.
> String.valueOf(doubleValue);
> > 
> > Daniel
> > 
> > 
> > --
> > Daniel Noll
> > ...
> > 
> 
> -- 
> View this message in context:
>
http://www.nabble.com/Reading-numeric-values-as-strings-from-a-cell-tf11
> 26130.html#a6179056
> Sent from the POI - User forum at Nabble.com.
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> Mailing List:    
> http://jakarta.apache.org/site/mail2.html#poi
> The Apache Jakarta Poi Project: 
> http://jakarta.apache.org/poi/
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> Mailing List:    
> http://jakarta.apache.org/site/mail2.html#poi
> The Apache Jakarta Poi Project: 
> http://jakarta.apache.org/poi/
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/



                
---------------------------------
Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ 
countries) for 2ยข/min or less.

Reply via email to