增加单元格文字自动换行
parent
b64eb516b1
commit
2e149ab7be
|
@ -7,6 +7,7 @@ func DefaultTitleStyle() *excelize.Style {
|
||||||
Alignment: &excelize.Alignment{
|
Alignment: &excelize.Alignment{
|
||||||
Horizontal: "center",
|
Horizontal: "center",
|
||||||
Vertical: "center",
|
Vertical: "center",
|
||||||
|
WrapText: true,
|
||||||
},
|
},
|
||||||
Font: &excelize.Font{
|
Font: &excelize.Font{
|
||||||
Bold: true,
|
Bold: true,
|
||||||
|
@ -46,6 +47,7 @@ func DefaultCellStyle() *excelize.Style {
|
||||||
Alignment: &excelize.Alignment{
|
Alignment: &excelize.Alignment{
|
||||||
Horizontal: "center",
|
Horizontal: "center",
|
||||||
Vertical: "center",
|
Vertical: "center",
|
||||||
|
WrapText: true,
|
||||||
},
|
},
|
||||||
// Font: &excelize.Font{
|
// Font: &excelize.Font{
|
||||||
// Bold: true,
|
// Bold: true,
|
||||||
|
|
|
@ -55,7 +55,7 @@ func TestMain(T *testing.T) {
|
||||||
TotalCompanyInvest: 300,
|
TotalCompanyInvest: 300,
|
||||||
Data: []Data4{
|
Data: []Data4{
|
||||||
{
|
{
|
||||||
ProjectName: "项目1",
|
ProjectName: "项目1buiognui你哦凝固和你哦i安抚ing哦in诶哦怕你给哦发布挖HiFi你哦别喝UI会给你入和",
|
||||||
ProjectUnit: "单位1",
|
ProjectUnit: "单位1",
|
||||||
CentralInvest: 10,
|
CentralInvest: 10,
|
||||||
LocalInvest: 20,
|
LocalInvest: 20,
|
||||||
|
|
BIN
test4.xlsx
BIN
test4.xlsx
Binary file not shown.
Loading…
Reference in New Issue