From 836180fe0ed73d314b0ad56c99d5e6075d2316bb Mon Sep 17 00:00:00 2001 From: RuoYi Date: Fri, 11 Nov 2022 11:31:27 +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=E4=B8=BA=E7=A9=BA?= =?UTF-8?q?=E4=BC=9A=E5=87=BA=E7=8E=B0[]=E9=97=AE=E9=A2=98?= 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 | 4 ++++ 1 file changed, 4 insertions(+) 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 3310220..cd8dd41 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 @@ -911,6 +911,10 @@ public class ExcelUtil { cellValue = RegExUtils.replaceFirst(cellValue, FORMULA_REGEX_STR, "\t$0"); } + if (value instanceof Collection && StringUtils.equals("[]", cellValue)) + { + cellValue = StringUtils.EMPTY; + } cell.setCellValue(StringUtils.isNull(cellValue) ? attr.defaultValue() : cellValue + attr.suffix()); } else if (ColumnType.NUMERIC == attr.cellType())