From d7412b89822bed902e34b522d1c1a857d7d9cb06 Mon Sep 17 00:00:00 2001 From: DengBiao <2319963317@qq.com> Date: Fri, 22 Sep 2023 21:35:49 +0800 Subject: [PATCH] update --- app/admin/svc/svc_data_statisstics.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/admin/svc/svc_data_statisstics.go b/app/admin/svc/svc_data_statisstics.go index 9da075e..89cb497 100644 --- a/app/admin/svc/svc_data_statisstics.go +++ b/app/admin/svc/svc_data_statisstics.go @@ -678,15 +678,13 @@ func CentralKitchenForSchoolDataStatisticsExport(req md.CentralKitchenForSchoolD titleList = []string{"年级", "班级", "早餐", "午餐", "晚餐"} xlsx.SetSheetRow("Sheet1", "A2", &titleList) xlsx.MergeCell("Sheet1", "A1", "E1") //合并单元格 - style, err := xlsx.NewStyle(`{"fill":{"type":"pattern","color":["FFFF00"],"pattern":1}}`) + style, err := xlsx.NewStyle(`{"fill":{"type":"pattern","color":["FFFF00"],"pattern":1}, "alignment":{"horizontal":"center"}}`) if err != nil { logx.Error(err) println("<<<>>>>Error:::", err.Error()) panic(err) } xlsx.SetCellStyle("Sheet1", "A1", "E1", style) - style, err = xlsx.NewStyle(`{"alignment":{"horizontal":"center"}}`) - xlsx.SetCellStyle("Sheet1", "A1", "E1", style) xlsx.SetColWidth("Sheet1", "A", "E", 20)