master
huanghai 5 years ago
parent 3d04898be0
commit 810700f17b

@ -417,7 +417,9 @@ func checkExcel(excelPath string, s1 ExcelUtil.TemplateStruct, MapClass map[stri
//当前年份
CurrentYear := time.Now().Year()
RedStyle, _ := f.GetCellStyle(s1.Title, Const.RedCell)
WhiteStyle, _ := f.GetCellStyle(s1.Title, Const.WhiteCell)
for i, row := range rows {
//放过表头
if i < ExcelUtil.HiddenRows+1 {
@ -573,12 +575,10 @@ func checkExcel(excelPath string, s1 ExcelUtil.TemplateStruct, MapClass map[stri
cell := cName + CommonUtil.ConvertIntToString(i+1)
if !pass {
//红色
style, _ := f.GetCellStyle(s1.Title, Const.RedCell)
_ = f.SetCellStyle(s1.Title, cell, cell, style)
_ = f.SetCellStyle(s1.Title, cell, cell, RedStyle)
firstSuccess = false
} else {
style, _ := f.GetCellStyle(s1.Title, Const.WhiteCell)
_ = f.SetCellStyle(s1.Title, cell, cell, style)
_ = f.SetCellStyle(s1.Title, cell, cell, WhiteStyle)
}
}
}

Loading…
Cancel
Save