-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyle.go
34 lines (31 loc) · 884 Bytes
/
style.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package exportToExcel
import "github.com/xuri/excelize/v2"
func DefaultTitleStyle() *excelize.Style {
return &excelize.Style{
Border: []excelize.Border{
{Type: "left", Color: "000000", Style: 2},
{Type: "top", Color: "000000", Style: 2},
{Type: "bottom", Color: "000000", Style: 2},
{Type: "right", Color: "000000", Style: 2},
},
Font: &excelize.Font{Bold: true, Size: 12},
Alignment: &excelize.Alignment{
Horizontal: "center",
},
Protection: &excelize.Protection{},
}
}
func DefaultDataStyle() *excelize.Style {
return &excelize.Style{
Border: []excelize.Border{
{Type: "left", Color: "000000", Style: 1},
{Type: "bottom", Color: "000000", Style: 1},
{Type: "right", Color: "000000", Style: 1},
},
Font: &excelize.Font{Size: 12},
Alignment: &excelize.Alignment{
Horizontal: "left",
},
Protection: &excelize.Protection{},
}
}