|
|
@ -279,7 +279,12 @@ public class ExcelWriteFillExecutor extends AbstractExcelWriteExecutor { |
|
|
|
if (cell == null) { |
|
|
|
if (cell == null) { |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
boolean needFill = |
|
|
|
prepareData(cell.getStringCellValue(), analysisCellList, collectionAnalysisCellList, i, j); |
|
|
|
prepareData(cell.getStringCellValue(), analysisCellList, collectionAnalysisCellList, i, j); |
|
|
|
|
|
|
|
// Prevent empty data from not being replaced
|
|
|
|
|
|
|
|
if (needFill) { |
|
|
|
|
|
|
|
cell.setCellValue(StringUtils.EMPTY); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
templateAnalysisCache.put(sheetNo, analysisCellList); |
|
|
|
templateAnalysisCache.put(sheetNo, analysisCellList); |
|
|
@ -287,10 +292,19 @@ public class ExcelWriteFillExecutor extends AbstractExcelWriteExecutor { |
|
|
|
return analysisCache.get(sheetNo); |
|
|
|
return analysisCache.get(sheetNo); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void prepareData(String value, List<AnalysisCell> analysisCellList, |
|
|
|
/** |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @param value |
|
|
|
|
|
|
|
* @param analysisCellList |
|
|
|
|
|
|
|
* @param collectionAnalysisCellList |
|
|
|
|
|
|
|
* @param rowIndex |
|
|
|
|
|
|
|
* @param columnIndex |
|
|
|
|
|
|
|
* @return Is a cell to be filled |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
private boolean prepareData(String value, List<AnalysisCell> analysisCellList, |
|
|
|
List<AnalysisCell> collectionAnalysisCellList, int rowIndex, int columnIndex) { |
|
|
|
List<AnalysisCell> collectionAnalysisCellList, int rowIndex, int columnIndex) { |
|
|
|
if (StringUtils.isEmpty(value)) { |
|
|
|
if (StringUtils.isEmpty(value)) { |
|
|
|
return; |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
AnalysisCell analysisCell = null; |
|
|
|
AnalysisCell analysisCell = null; |
|
|
|
int startIndex = 0; |
|
|
|
int startIndex = 0; |
|
|
@ -365,7 +379,9 @@ public class ExcelWriteFillExecutor extends AbstractExcelWriteExecutor { |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
collectionAnalysisCellList.add(analysisCell); |
|
|
|
collectionAnalysisCellList.add(analysisCell); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private String convertPrepareData(String prepareData) { |
|
|
|
private String convertPrepareData(String prepareData) { |
|
|
|