!663 回退 'Pull Request !662 : 发布 5.3.1 正式版'

* 回退 'Pull Request !662 : 发布 5.3.1 正式版'
This commit is contained in:
疯狂的狮子Li
2025-03-27 02:53:23 +00:00
parent 7a9f51fc7a
commit 8aa60abb1f
13 changed files with 25 additions and 24 deletions

View File

@@ -245,10 +245,9 @@ public class ExcelUtil {
.registerWriteHandler(new DataWriteHandler(data.get(0).getClass()))
.build();
WriteSheet writeSheet = EasyExcel.writerSheet().build();
FillConfig fillConfig = FillConfig.builder().forceNewRow(Boolean.TRUE).build();
// 单表多数据导出 模板格式为 {.属性}
for (T d : data) {
excelWriter.fill(d, fillConfig, writeSheet);
excelWriter.fill(d, writeSheet);
}
excelWriter.finish();
}
@@ -321,7 +320,7 @@ public class ExcelUtil {
// 多表导出必须使用 FillWrapper
excelWriter.fill(new FillWrapper(map.getKey(), (Collection<?>) map.getValue()), fillConfig, writeSheet);
} else {
excelWriter.fill(map.getValue(), fillConfig, writeSheet);
excelWriter.fill(map.getValue(), writeSheet);
}
}
excelWriter.finish();