@@ -33,19 +33,19 @@ func (a Applicability) String() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (a Applicability) MarshalExcel() ExcelValue {
|
func (a Applicability) MarshalExcel() ExcelValue {
|
||||||
color := "#FFB6C1" // Light red for not applicable
|
color := "FFB6C1" // Light red for not applicable
|
||||||
if a.IsApplicable {
|
if a.IsApplicable {
|
||||||
color = "#90EE90" // Light green for applicable
|
color = "90EE90" // Light green for applicable
|
||||||
}
|
}
|
||||||
|
|
||||||
return ExcelValue{
|
return ExcelValue{
|
||||||
Value: a.Value,
|
Value: a.Value,
|
||||||
Style: &excelize.Style{
|
Style: &excelize.Style{
|
||||||
Border: []excelize.Border{
|
Border: []excelize.Border{
|
||||||
{Type: "left", Color: "#000000", Style: 1},
|
{Type: "left", Color: "000000", Style: 1},
|
||||||
{Type: "top", Color: "#000000", Style: 1},
|
{Type: "top", Color: "000000", Style: 1},
|
||||||
{Type: "bottom", Color: "#000000", Style: 1},
|
{Type: "bottom", Color: "000000", Style: 1},
|
||||||
{Type: "right", Color: "#000000", Style: 1},
|
{Type: "right", Color: "000000", Style: 1},
|
||||||
},
|
},
|
||||||
Fill: excelize.Fill{Type: "pattern", Color: []string{color}, Pattern: 1},
|
Fill: excelize.Fill{Type: "pattern", Color: []string{color}, Pattern: 1},
|
||||||
Alignment: &excelize.Alignment{Horizontal: "center", Vertical: "center", WrapText: true},
|
Alignment: &excelize.Alignment{Horizontal: "center", Vertical: "center", WrapText: true},
|
||||||
|
|||||||
Reference in New Issue
Block a user