0 Star 1 Fork 0

有点心急 / gotls

Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
Clone or Download
style.go 924 Bytes
Copy Edit Raw Blame History
有点心急 authored 2024-05-04 01:31 . 24.05.04
package excelT
import (
"github.com/xuri/excelize/v2"
)
// 颜色填充
func (cell *Cell) SetFillWarnStyle() {
cell.GetStyle().Fill = excelize.Fill{Type: "pattern", Color: []string{"FFFF00"}, Pattern: 1}
cell.SaveStyle()
}
func (cell *Cell) SetFillErrorStyle() {
cell.GetStyle().Fill = excelize.Fill{Type: "pattern", Color: []string{"FF0000"}, Pattern: 1}
cell.SaveStyle()
}
func (cell *Cell) SetFillStyle(color string) {
cell.GetStyle().Fill = excelize.Fill{Type: "pattern", Color: []string{color}, Pattern: 1}
cell.SaveStyle()
}
// 字体
func (cell *Cell) SetFontWarnStyle() {
cell.GetStyle().Font = &excelize.Font{
Color: "FFFF00",
}
cell.SaveStyle()
}
func (cell *Cell) SetFontErrorStyle() {
cell.GetStyle().Font = &excelize.Font{
Color: "FF0000",
}
cell.SaveStyle()
}
func (cell *Cell) SetFontStyle(color string) {
cell.GetStyle().Font = &excelize.Font{
Color: color,
}
cell.SaveStyle()
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/ydxj/gotls.git
git@gitee.com:ydxj/gotls.git
ydxj
gotls
gotls
v0.0.7

Search

344bd9b3 5694891 D2dac590 5694891