From 8c95bfca7fb2a6d2f088ea93d3542ebd73fb20dd Mon Sep 17 00:00:00 2001 From: Jiaju Zhuang Date: Fri, 17 Sep 2021 16:15:58 +0800 Subject: [PATCH] =?UTF-8?q?*=20=E4=BF=AE=E6=94=B9=E5=A1=AB=E5=85=85?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E6=97=A0=E6=B3=95=E4=BD=BF=E7=94=A8=E7=94=9F?= =?UTF-8?q?=E6=88=90=E7=9A=84=E6=A8=A1=E6=9D=BF=20[Issue=20#1552]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../excel/write/executor/ExcelWriteFillExecutor.java | 7 ++++++- update.md | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/alibaba/excel/write/executor/ExcelWriteFillExecutor.java b/src/main/java/com/alibaba/excel/write/executor/ExcelWriteFillExecutor.java index 7389735..3c2268c 100644 --- a/src/main/java/com/alibaba/excel/write/executor/ExcelWriteFillExecutor.java +++ b/src/main/java/com/alibaba/excel/write/executor/ExcelWriteFillExecutor.java @@ -473,7 +473,12 @@ public class ExcelWriteFillExecutor extends AbstractExcelWriteExecutor { } lastPrepareDataIndex = suffixIndex + 1; } - + // fix https://github.com/alibaba/easyexcel/issues/1552 + // When read template, XLSX data may be in `is` labels, and set the time set in `v` label, lead to can't set + // up successfully, so all data format to empty first. + if (analysisCell != null && CollectionUtils.isNotEmpty(analysisCell.getVariableList())) { + cell.setBlank(); + } return dealAnalysisCell(analysisCell, value, rowIndex, lastPrepareDataIndex, length, firstRowCache, preparedData); } diff --git a/update.md b/update.md index d60e08c..2b7e082 100644 --- a/update.md +++ b/update.md @@ -27,6 +27,7 @@ * 修复不创建对象写入数据异常 [Issue #1702](https://github.com/alibaba/easyexcel/issues/1702) * 修复头和数据对象不一致会覆盖的问题 [Issue #1870](https://github.com/alibaba/easyexcel/issues/1870) * 修复忽略字段后可能排序不一致的问题 +* 修改填充时,无法使用生成的模板 [Issue #1552](https://github.com/alibaba/easyexcel/issues/1552) # 2.2.11 -- GitLab