浏览代码

导出问题修复

wangming 1 年之前
父节点
当前提交
4a46279c00
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      business-common/src/main/java/com/rongwei/bscommon/sys/utils/XlsSheetUtil.java

+ 5 - 0
business-common/src/main/java/com/rongwei/bscommon/sys/utils/XlsSheetUtil.java

@@ -306,6 +306,11 @@ public class XlsSheetUtil {
 
                 for(int i = rows.getIntValue(0), j = rows.getIntValue(1); i <= j; i++) {
                     Row row = sheet.getRow(i);
+
+                    if(row == null) {
+                        row = sheet.createRow(i);
+                    }
+
                     for(int colStart = cols.getIntValue(0), colEnd = cols.getIntValue(1); colStart <= colEnd; colStart++) {
 
                         Cell cell = row.getCell(colStart);