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 1526d7e52..a7c0e20c4 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 @@ -694,12 +694,19 @@ public class ExcelUtil // 得到导出对象. T vo = (T) list.get(i); Collection subList = null; - if (isSubListValue(vo)) + if (isSubList()) { - subList = getListCellValue(vo); - subMergedLastRowNum = subMergedLastRowNum + subList.size(); + if (isSubListValue(vo)) + { + subList = getListCellValue(vo); + subMergedLastRowNum = subMergedLastRowNum + subList.size(); + } + else + { + subMergedFirstRowNum++; + subMergedLastRowNum++; + } } - int column = 0; for (Object[] os : fields) {