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 af3f6c24..e91e2834 100644 --- a/src/main/java/com/alibaba/excel/write/executor/ExcelWriteFillExecutor.java +++ b/src/main/java/com/alibaba/excel/write/executor/ExcelWriteFillExecutor.java @@ -178,7 +178,7 @@ public class ExcelWriteFillExecutor extends AbstractExcelWriteExecutor { private void doFill(List analysisCellList, Object oneRowData, FillConfig fillConfig, Integer relativeRowIndex) { - if (CollectionUtils.isEmpty(analysisCellList)) { + if (CollectionUtils.isEmpty(analysisCellList) || oneRowData == null) { return; } Map dataMap; diff --git a/update.md b/update.md index a2296684..b3f80f77 100644 --- a/update.md +++ b/update.md @@ -29,6 +29,7 @@ * 修复忽略字段后可能排序不一致的问题 * 修改填充时,无法使用生成的模板 [Issue #1552](https://github.com/alibaba/easyexcel/issues/1552) * 修改填充可以不自动继承样式 [Issue #1710](https://github.com/alibaba/easyexcel/issues/1710) +* 修复填充数据不能为空的问题 [Issue #1703](https://github.com/alibaba/easyexcel/issues/1703) # 2.2.11