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)