From 63c830f2121e706e501eb49be70351617beed87e Mon Sep 17 00:00:00 2001 From: duanqiaoyanyu <825388931@qq.com> Date: Mon, 9 Aug 2021 17:55:55 +0800 Subject: [PATCH] fix: Fix the continuous occurrence of {}{} filled templates in excel, causing rendering failure after the first one --- .../alibaba/excel/write/executor/ExcelWriteFillExecutor.java | 2 +- 1 file changed, 1 insertion(+), 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 5930a311..eac548cc 100644 --- a/src/main/java/com/alibaba/excel/write/executor/ExcelWriteFillExecutor.java +++ b/src/main/java/com/alibaba/excel/write/executor/ExcelWriteFillExecutor.java @@ -455,7 +455,7 @@ public class ExcelWriteFillExecutor extends AbstractExcelWriteExecutor { analysisCell.setCellType(WriteTemplateAnalysisCellTypeEnum.COLLECTION); } analysisCell.getVariableList().add(variable); - if (lastPrepareDataIndex == prefixIndex) { + if (lastPrepareDataIndex == prefixIndex && 0 == prefixIndex) { analysisCell.getPrepareDataList().add(StringUtils.EMPTY); } else { String data = convertPrepareData(value.substring(lastPrepareDataIndex, prefixIndex));