poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <deshmol-li...@yahoo.com>
Subject Re: Number Record
Date Wed, 23 Aug 2006 17:33:04 GMT
See if the following helps you:


HSSFCell cell = ......
HSSFCellStyle cellStyle = cell.getCellStyle();
int formatIndex = cellStyle.getDataFormat
String format = HSSFDataFormat.getFormat(formatIndex);

// Use the format String to format 
// ...the number value from the cell

String formattedValue = applyFormat(cell, format);

// You will need to write code for applyFormat()




Regards,
~ amol




--- "Finnerty, Mary Ann (GE Healthcare)"
<maryann.finnerty@ge.com> wrote:

> I am using POI to read xls files - no interest in
> writing them - BUT I
> need to get Number fields as plain text -- exactly
> as they are input
> into the spreadsheet.
> The default behavior is to read them in and turn
> them into doubles, but
> I can't do that.
>  
> Anyone know how I can get around this?
>  
> Thanks!
> Maffy
>  
> 
> Mary Ann "Maffy" Finnerty
> 
> GE Healthcare 
> 
> Integrated IT 
> 
> Enterprise Solutions
> 
> Sr. Software Engineer
> 
>  
> 
> T 206 607 5612
> 
> C 206 419 6784
> 
> E Maryann.Finnerty@ge.com
> 
> www.gehealthcare.com
> 
>  
> 
> 925 Fourth Avenue, Suite 400
> 
> Seattle, WA 98104 USA
> 
> -----------
> I would rather be exposed to the inconveniences
> attending too much
> liberty than to those attending too small a degree
> of it.
>   - Thomas Jefferson
>
<http://www.quotationspage.com/quotes/Thomas_Jefferson>
> 
>  
> 


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


Mime
View raw message