lyhzzz 2 달 전
부모
커밋
233db5ae62
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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);