Browse Source

fix: Fix the continuous occurrence of {}{} filled templates in excel, causing rendering failure after the first one

developing
duanqiaoyanyu 3 years ago
parent
commit
63c830f212
  1. 2
      src/main/java/com/alibaba/excel/write/executor/ExcelWriteFillExecutor.java

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

Loading…
Cancel
Save