Hi Andy, thanks for the response... but this is not what I'm looking for ;-(
HSSFCell.getRichStringCellValue() works only for Strings. I'm looking for something more generic to work for instance with numeric and date cells as well. getCellStyle() allows to retrieve the style but I don't see any facility to retrieve the result of the style applied on the cell content. I can look at the data format of the style by myself, but I imagine that it is a common requirement and was hoping to find an existing way for it. Cheers, Marc. -- Blog: http://mguillem.wordpress.com Andy Chien wrote: > Hi Marc: > > Is this the class you might be looking for? > > http://poi.apache.org/apidocs/org/apache/poi/hssf/usermodel/HSSFRichTextString.html > HSSFCell > > You can use HSSFCell.getRichStringCellValue() to get Excel formatted > string. > > http://poi.apache.org/apidocs/org/apache/poi/hssf/usermodel/HSSFCell.html > > Or another interpretation of what you may be thinking is a combination > of HSSFCell.getCellNum() and HSSFCell.getCellStyle() > > http://poi.apache.org/apidocs/org/apache/poi/hssf/usermodel/HSSFCell.html > > Hope this helps. > > > Marc Guillemot wrote: >> Hi, >> >> is there a simple way to get the formatted value (as String) of a cell >> without having to use custom code to deal with the cell format? >> >> If no, wouldn't it make sense to add such a feature? >> >> Cheers, >> Marc. > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
