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));