This post shows the code snippet on how to read and write java.util.Date object to an excel.
Writing date into excel is easy;
Reading date value from excel we must make sure the cell type is date to avoid exception.
Reading date value from excel file
Cell cell = row.getCell(i);
Date dateValue = null;
if(cell.getCellType() == cell.CELL_TYPE_NUMERIC) {
if (DateUtil.isCellDateFormatted(cell)) {
dateValue = cell.getDateCellValue();
}
}