Fetch the repository succeeded.
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()
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。