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 9d43dad4..0958a137 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 @@ -993,7 +993,7 @@ public class ExcelUtil { // 创建cell cell = row.createCell(column); - if (isSubListValue(vo) && attr.needMerge()) + if (isSubListValue(vo) && getListCellValue(vo).size() > 1 && attr.needMerge()) { CellRangeAddress cellAddress = new CellRangeAddress(subMergedFirstRowNum, subMergedLastRowNum, column, column); sheet.addMergedRegion(cellAddress);