On Tue, 5 Aug 2008, Ravi Sundaar wrote:
I have spreadsheets that contains values like "5/10/2008". When I inspect the cell, the type of the cell that contains these kind of date values (using getCellType), the type is HSSFCell.CELL_TYPE_NUMERIC
That's normal. That's how excel stores dates. These two methods should help: http://poi.apache.org/apidocs/org/apache/poi/hssf/usermodel/HSSFDateUtil.html#isCellDateFormatted(org.apache.poi.hssf.usermodel.HSSFCell) http://poi.apache.org/apidocs/org/apache/poi/hssf/usermodel/HSSFCell.html#getDateCellValue()
The interesting quirk is that, if the value is "15/10/2008" everything works ok.
Your excel is probably set to US mode, so it thinks that 15/10/2008 is the 10th day of the 15th month, gives in and treats it as a string. You'll need to tell excel you're based outside of the US, so it expects dd/mm/yyyy (I forget exactly what the trick to do this is though)
Nick --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
