Hello,
I am writing code using HSSF to parse Excel spreadsheets. I would like to
recognize a cell as a date or not. I'm using the method shown in the code
below. However, I find this does not detect all date cells. For example
"MM/DD", "MM/DD/YY", and "<month> DD, YYYY" formats are not detected. Does
anyone know of a better way to determine if a cell contains a date?
Thanks,
John
HSSFCell cell = row.getCell(i);
switch (cell.getCellType()) {
case HSSFCell.CELL_TYPE_NUMERIC:
if (HSSFDateUtil.isCellDateFormatted(cell) == true) {
// do date stuff
}
break;
}
Email * [EMAIL PROTECTED]
Phone * 919-254-8021
Snail * MZDA/062, IBM Corp., P.O. Box 12195, RTP, NC 27709-2195
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]