diff --git a/mailbox-lan/src/main/java/com/biutag/lan/service/DataService.java b/mailbox-lan/src/main/java/com/biutag/lan/service/DataService.java index 6bd8f0c..fa18f89 100644 --- a/mailbox-lan/src/main/java/com/biutag/lan/service/DataService.java +++ b/mailbox-lan/src/main/java/com/biutag/lan/service/DataService.java @@ -391,7 +391,7 @@ public class DataService extends ServiceImpl { response.setCharacterEncoding("UTF-8"); try (OutputStream out = response.getOutputStream()) { // 使用EasyExcel写入数据到输出流 - ExcelWriter excelWriter = EasyExcel.write(out).build(); + ExcelWriter excelWriter = EasyExcel.write(out).inMemory(Boolean.TRUE).build(); WriteSheet writeSheet = EasyExcel.writerSheet("局长信箱即接即办信件三率统计").head(head).build(); excelWriter.write(data1, writeSheet); excelWriter.finish(); @@ -445,7 +445,7 @@ public class DataService extends ServiceImpl { response.setCharacterEncoding("UTF-8"); try (OutputStream out = response.getOutputStream()) { // 使用EasyExcel写入数据到输出流 - ExcelWriter excelWriter = EasyExcel.write(out).build(); + ExcelWriter excelWriter = EasyExcel.write(out).inMemory(Boolean.TRUE).build(); WriteSheet writeSheet = EasyExcel.writerSheet("局长信箱即接即办信件三率统计").head(head).automaticMergeHead(true).build(); excelWriter.write(data1, writeSheet); excelWriter.finish(); @@ -539,7 +539,7 @@ public class DataService extends ServiceImpl { response.setCharacterEncoding("UTF-8"); try (OutputStream out = response.getOutputStream()) { // 使用EasyExcel写入数据到输出流 - ExcelWriter excelWriter = EasyExcel.write(out).build(); + ExcelWriter excelWriter = EasyExcel.write(out).inMemory(Boolean.TRUE).build(); WriteSheet writeSheet = EasyExcel.writerSheet("局长信箱即接即办信件三率统计").head(head).automaticMergeHead(true).build(); excelWriter.write(data1, writeSheet); excelWriter.finish();