From d003670fd371b318aa10d2566c249c3bec401d76 Mon Sep 17 00:00:00 2001 From: laishajiang <12977614+laishajiang@user.noreply.gitee.com> Date: Mon, 8 Apr 2024 09:45:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=A1=E4=BB=B6=E7=BB=9F=E8=AE=A1=E5=AF=BC?= =?UTF-8?q?=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/biutag/lan/service/DataService.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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();