diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/poi/ExcelUtil.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/poi/ExcelUtil.java index 681f6cd..e6daece 100644 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/poi/ExcelUtil.java +++ b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/poi/ExcelUtil.java @@ -567,12 +567,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) {