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 7389735d..3c2268cd 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 d60e08c3..2b7e082e 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