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()) {