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)" <[EMAIL PROTECTED]> 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 [EMAIL PROTECTED] > > 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: [EMAIL PROTECTED] Mailing List: http://jakarta.apache.org/site/mail2.html#poi The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/
