lyhzzz 2 tháng trước cách đây
mục cha
commit
233db5ae62
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      src/main/java/com/fdkankan/agent/util/ExcelUtil.java

+ 1 - 1
src/main/java/com/fdkankan/agent/util/ExcelUtil.java

@@ -43,7 +43,7 @@ public class ExcelUtil {
 
                 if (cell != null && cell.getCellTypeEnum() != CellType.STRING && HSSFDateUtil.isCellDateFormatted(cell)) {
                     Date date = cell.getDateCellValue();
-                    if (HSSFDateUtil.isValidExcelDate(date.getTime())) {
+                    if (date != null && HSSFDateUtil.isValidExcelDate(date.getTime())) {
                         SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
                         String value = sdf.format(date);
                         map.put(cellNum,value);