From 0b4e334044d0d2f9bb14e5988c0243f00d7b3023 Mon Sep 17 00:00:00 2001 From: Jiaju Zhuang Date: Fri, 13 May 2022 15:37:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=BC=82=E5=B8=B8=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E7=9A=84=E6=83=85=E5=86=B5=E4=B8=8B=E4=B8=8D=E4=BC=9A?= =?UTF-8?q?=E7=A9=BA=E6=8C=87=E9=92=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../read/metadata/holder/xlsx/XlsxReadWorkbookHolder.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/easyexcel-core/src/main/java/com/alibaba/excel/read/metadata/holder/xlsx/XlsxReadWorkbookHolder.java b/easyexcel-core/src/main/java/com/alibaba/excel/read/metadata/holder/xlsx/XlsxReadWorkbookHolder.java index 4e70aa0e..c5d78e0f 100644 --- a/easyexcel-core/src/main/java/com/alibaba/excel/read/metadata/holder/xlsx/XlsxReadWorkbookHolder.java +++ b/easyexcel-core/src/main/java/com/alibaba/excel/read/metadata/holder/xlsx/XlsxReadWorkbookHolder.java @@ -65,6 +65,9 @@ public class XlsxReadWorkbookHolder extends ReadWorkbookHolder { return null; } XSSFCellStyle xssfCellStyle = stylesTable.getStyleAt(dateFormatIndexInteger); + if (xssfCellStyle == null) { + return null; + } dataFormatData.setIndex(xssfCellStyle.getDataFormat()); dataFormatData.setFormat(BuiltinFormats.getBuiltinFormat(dataFormatData.getIndex(), xssfCellStyle.getDataFormatString(), globalConfiguration().getLocale()));