From 8cd34e42d7c5779931fc32e1e1afaf2b56928901 Mon Sep 17 00:00:00 2001 From: yy2205 <2238220225@qq.com> Date: Tue, 22 Apr 2025 16:05:47 +0800 Subject: [PATCH] =?UTF-8?q?excel=E8=A1=A8=E6=A0=BC=E5=8D=AB=E7=94=9F?= =?UTF-8?q?=E9=99=A2=E3=80=81=E8=A1=8C=E6=94=BF=E6=9D=91=E5=88=97=E5=AE=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/inspectpatient/InspectPatientServiceImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/service/inspectpatient/InspectPatientServiceImpl.java b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/service/inspectpatient/InspectPatientServiceImpl.java index 9f4f45c..946b765 100644 --- a/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/service/inspectpatient/InspectPatientServiceImpl.java +++ b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/service/inspectpatient/InspectPatientServiceImpl.java @@ -924,8 +924,8 @@ public class InspectPatientServiceImpl implements InspectPatientService { sumVO.setOrgname("合计"); writer.write(Arrays.asList(sumVO)); - writer.autoSizeColumn(0); - writer.autoSizeColumn(1); + writer.setColumnWidth(0,25); + writer.setColumnWidth(1,25); //response为HttpServletResponse对象 response.setContentType("application/vnd.ms-excel;charset=utf-8"); //test.xls是弹出下载对话框的文件名,不能为中文,中文请自行编码