Hi,
I use this code:
boolean isCellDateFormatted(HSSFWorkbook book, HSSFCell cell)
{
boolean result = false;
short format = cell.getCellStyle().getDataFormat();
if (HSSFDateUtil.isValidExcelDate(cell.getNumericCellValue()))
{
if (HSSFDateUtil.isInternalDateFormat(format))
{
result = true;
}
else
{
String fmtText = book.createDataFormat().getFormat(format);
if (fmtText != null
&& ((fmtText = fmtText.toUpperCase()).indexOf("D") >= 0
|| fmtText.indexOf("M") >= 0
|| fmtText.indexOf("Y") >= 0
|| fmtText.indexOf("H") >= 0
|| fmtText.indexOf("S") >= 0))
{
result = true;
}
}
}
return result;
}
I am not sure that it works in 100% of cases.
Regards,
Iouri
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]