From 9e6b2a12650c5a6d24be3de8c078d31e7548750e Mon Sep 17 00:00:00 2001 From: "yuhong0206@sina.cn" Date: Mon, 29 Mar 2021 08:56:51 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E8=AF=BB=E5=8F=96excel=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=20if(row=20=3D=3D=20null)=20{=20=20=20=20=20continue;=20}=20?= =?UTF-8?q?=E5=88=A4=E6=96=AD=E3=80=82=E9=98=B2=E6=AD=A2=E6=9C=89=E6=97=B6?= =?UTF-8?q?=E5=80=99Excel=E8=A1=A8=E4=B8=AD=E6=9C=89=E7=A9=BA=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E8=A1=8C=EF=BC=8C=E5=AF=BC=E8=87=B4=E8=AF=BB=E5=8F=96?= =?UTF-8?q?=E6=97=B6=E5=87=BA=E7=8E=B0=E7=A9=BA=E6=8C=87=E9=92=88=E5=BC=82?= =?UTF-8?q?=E5=B8=B8=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java index dcba68e..15612b9 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java @@ -229,6 +229,10 @@ public class ExcelUtil { // 从第2行开始取数据,默认第一行是表头. Row row = sheet.getRow(i); + if(row == null) + { + continue; + } T entity = null; for (Map.Entry entry : fieldsMap.entrySet()) { From ec627704b2793a02d176f177a88a244ba4f53495 Mon Sep 17 00:00:00 2001 From: "yuhong0206@sina.cn" Date: Mon, 29 Mar 2021 08:58:46 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=8F=96=E6=B6=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java index 15612b9..dcba68e 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java @@ -229,10 +229,6 @@ public class ExcelUtil { // 从第2行开始取数据,默认第一行是表头. Row row = sheet.getRow(i); - if(row == null) - { - continue; - } T entity = null; for (Map.Entry entry : fieldsMap.entrySet()) { From 9b9c1b999fe0b1e21c038a1d5227609071fd7aa4 Mon Sep 17 00:00:00 2001 From: "yuhong0206@sina.cn" Date: Mon, 29 Mar 2021 09:00:44 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E8=AF=BB=E5=8F=96excel=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=20if(row=20=3D=3D=20null)=20{=20=20=20=20=20continue;=20}=20?= =?UTF-8?q?=E5=88=A4=E6=96=AD=E3=80=82=E9=98=B2=E6=AD=A2=E6=9C=89=E6=97=B6?= =?UTF-8?q?=E5=80=99Excel=E8=A1=A8=E4=B8=AD=E6=9C=89=E7=A9=BA=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E8=A1=8C=EF=BC=8C=E5=AF=BC=E8=87=B4=E8=AF=BB=E5=8F=96?= =?UTF-8?q?=E6=97=B6=E5=87=BA=E7=8E=B0=E7=A9=BA=E6=8C=87=E9=92=88=E5=BC=82?= =?UTF-8?q?=E5=B8=B8=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java index dcba68e..15612b9 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java @@ -229,6 +229,10 @@ public class ExcelUtil { // 从第2行开始取数据,默认第一行是表头. Row row = sheet.getRow(i); + if(row == null) + { + continue; + } T entity = null; for (Map.Entry entry : fieldsMap.entrySet()) {