From 9b139f42f4a2fc5924abbbe31f65795b32d30549 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Wed, 10 Aug 2022 13:57:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=AF=BC=E5=87=BA=E5=AF=B9?= =?UTF-8?q?=E8=B1=A1=E7=9A=84=E5=AD=90=E5=88=97=E8=A1=A8=E5=88=A4=E6=96=AD?= =?UTF-8?q?=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java b/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java index 8d70206..4cbfb4b 100644 --- a/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java +++ b/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);