Well, in an excel file, the displayed value is not stored. The cell value and the cell format are stored separately, and dates are stored as longs.
Remember POI is, by design, a very thin wrapper around the file structure. So to get the displayed value, you will have to get the format and the value separately and merge the two yourself. The problem of course is that the format is Excel specific, so to use it in java, you might have to massage it a bit. If you manage to get it done, it might make a good addition to the contrib area of the POI sourcebase. Regards - Avik On Sat, 2003-09-27 at 04:19, Jean, Victor [IT] wrote: > I have a cell with a date value of "12/21/2003." > > However, I've formatted it on the spreadsheet to appear as "December-03." > > My question is how do I get the "December-03" String value so that I can > output this to a text file? > > Basically, I would like a "what you see is what you get" functionality. > So evaluated formulas, formatted dates, formatted numbers (ie $1.32) would > be outputted correctly. > > > Currently, using HSSFCell you only have: > > getCellFormula > getNumericCellValue > getStringCellValue > getDateCellValue > > > I would like a String getDisplayedValue() which shows what's displayed on > the spreadsheet. > > > Please help if you know of a way to do this. > > Thanks, > > -Victor > > > > > --------------------------------------------------------------------- > 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]
