2024-05-15 15:09:48 +08:00
|
|
|
package export
|
|
|
|
|
|
|
|
import "github.com/xuri/excelize/v2"
|
|
|
|
|
|
|
|
func DefaultTitleStyle() *excelize.Style {
|
|
|
|
return &excelize.Style{
|
|
|
|
Alignment: &excelize.Alignment{
|
|
|
|
Horizontal: "center",
|
|
|
|
Vertical: "center",
|
2024-06-06 10:41:19 +08:00
|
|
|
WrapText: true,
|
2024-05-15 15:09:48 +08:00
|
|
|
},
|
|
|
|
Font: &excelize.Font{
|
|
|
|
Bold: true,
|
|
|
|
},
|
|
|
|
Fill: excelize.Fill{
|
|
|
|
Type: "pattern",
|
|
|
|
Color: []string{"4aa4ea"},
|
|
|
|
Pattern: 1,
|
|
|
|
},
|
|
|
|
Border: []excelize.Border{
|
|
|
|
{
|
|
|
|
Type: "left",
|
|
|
|
Color: "000000",
|
|
|
|
Style: 1,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
Type: "top",
|
|
|
|
Color: "000000",
|
|
|
|
Style: 1,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
Type: "right",
|
|
|
|
Color: "000000",
|
|
|
|
Style: 1,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
Type: "bottom",
|
|
|
|
Color: "000000",
|
|
|
|
Style: 1,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|
2024-05-16 16:53:29 +08:00
|
|
|
|
|
|
|
func DefaultCellStyle() *excelize.Style {
|
|
|
|
return &excelize.Style{
|
|
|
|
Alignment: &excelize.Alignment{
|
|
|
|
Horizontal: "center",
|
|
|
|
Vertical: "center",
|
2024-06-06 10:41:19 +08:00
|
|
|
WrapText: true,
|
2024-05-16 16:53:29 +08:00
|
|
|
},
|
|
|
|
// Font: &excelize.Font{
|
|
|
|
// Bold: true,
|
|
|
|
// },
|
|
|
|
// Fill: excelize.Fill{
|
|
|
|
// Type: "pattern",
|
|
|
|
// Color: []string{"4aa4ea"},
|
|
|
|
// Pattern: 1,
|
|
|
|
// },
|
|
|
|
Border: []excelize.Border{
|
|
|
|
{
|
|
|
|
Type: "left",
|
|
|
|
Color: "000000",
|
|
|
|
Style: 4,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
Type: "top",
|
|
|
|
Color: "000000",
|
|
|
|
Style: 4,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
Type: "right",
|
|
|
|
Color: "000000",
|
|
|
|
Style: 4,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
Type: "bottom",
|
|
|
|
Color: "000000",
|
|
|
|
Style: 4,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|