diff --git a/export/style.go b/export/style.go index a284d9f..7f960ff 100644 --- a/export/style.go +++ b/export/style.go @@ -7,6 +7,7 @@ func DefaultTitleStyle() *excelize.Style { Alignment: &excelize.Alignment{ Horizontal: "center", Vertical: "center", + WrapText: true, }, Font: &excelize.Font{ Bold: true, @@ -46,6 +47,7 @@ func DefaultCellStyle() *excelize.Style { Alignment: &excelize.Alignment{ Horizontal: "center", Vertical: "center", + WrapText: true, }, // Font: &excelize.Font{ // Bold: true, diff --git a/export4_test.go b/export4_test.go index cab8a10..b66162c 100644 --- a/export4_test.go +++ b/export4_test.go @@ -55,7 +55,7 @@ func TestMain(T *testing.T) { TotalCompanyInvest: 300, Data: []Data4{ { - ProjectName: "项目1", + ProjectName: "项目1buiognui你哦凝固和你哦i安抚ing哦in诶哦怕你给哦发布挖HiFi你哦别喝UI会给你入和", ProjectUnit: "单位1", CentralInvest: 10, LocalInvest: 20, diff --git a/test4.xlsx b/test4.xlsx index 60793bc..cd81494 100755 Binary files a/test4.xlsx and b/test4.xlsx differ