@@ -808,7 +808,7 @@ var validType = map[string]string{
808
808
"3_color_scale" : "3_color_scale" ,
809
809
"data_bar" : "dataBar" ,
810
810
"formula" : "expression" ,
811
- "iconSet" : "iconSet" ,
811
+ "icon_set" : "iconSet" ,
812
812
}
813
813
814
814
// criteriaType defined the list of valid criteria types.
@@ -2843,12 +2843,12 @@ func (f *File) SetCellStyle(sheet, hCell, vCell string, styleID int) error {
2843
2843
// ---------------+------------------------------------
2844
2844
// cell | Criteria
2845
2845
// | Value
2846
- // | Minimum
2847
- // | Maximum
2846
+ // | MinValue
2847
+ // | MaxValue
2848
2848
// date | Criteria
2849
2849
// | Value
2850
- // | Minimum
2851
- // | Maximum
2850
+ // | MinValue
2851
+ // | MaxValue
2852
2852
// time_period | Criteria
2853
2853
// text | Criteria
2854
2854
// | Value
@@ -2887,7 +2887,7 @@ func (f *File) SetCellStyle(sheet, hCell, vCell string, styleID int) error {
2887
2887
// | BarDirection
2888
2888
// | BarOnly
2889
2889
// | BarSolid
2890
- // iconSet | IconStyle
2890
+ // icon_set | IconStyle
2891
2891
// | ReverseIcons
2892
2892
// | IconsOnly
2893
2893
// formula | Criteria
@@ -2999,7 +2999,7 @@ func (f *File) SetCellStyle(sheet, hCell, vCell string, styleID int) error {
2999
2999
// },
3000
3000
// )
3001
3001
//
3002
- // type: Minimum - The 'Minimum ' parameter is used to set the lower limiting
3002
+ // type: MinValue - The 'MinValue ' parameter is used to set the lower limiting
3003
3003
// value when the criteria is either "between" or "not between".
3004
3004
//
3005
3005
// // Highlight cells rules: between...
@@ -3009,13 +3009,13 @@ func (f *File) SetCellStyle(sheet, hCell, vCell string, styleID int) error {
3009
3009
// Type: "cell",
3010
3010
// Criteria: "between",
3011
3011
// Format: format,
3012
- // Minimum: " 6",
3013
- // Maximum: " 8",
3012
+ // MinValue: 6",
3013
+ // MaxValue: 8",
3014
3014
// },
3015
3015
// },
3016
3016
// )
3017
3017
//
3018
- // type: Maximum - The 'Maximum ' parameter is used to set the upper limiting
3018
+ // type: MaxValue - The 'MaxValue ' parameter is used to set the upper limiting
3019
3019
// value when the criteria is either "between" or "not between". See the
3020
3020
// previous example.
3021
3021
//
@@ -3361,7 +3361,7 @@ func (f *File) appendCfRule(ws *xlsxWorksheet, rule *xlsxX14CfRule) error {
3361
3361
func extractCondFmtCellIs (c * xlsxCfRule , extLst * xlsxExtLst ) ConditionalFormatOptions {
3362
3362
format := ConditionalFormatOptions {StopIfTrue : c .StopIfTrue , Type : "cell" , Criteria : operatorType [c .Operator ], Format : * c .DxfID }
3363
3363
if len (c .Formula ) == 2 {
3364
- format .Minimum , format .Maximum = c .Formula [0 ], c .Formula [1 ]
3364
+ format .MinValue , format .MaxValue = c .Formula [0 ], c .Formula [1 ]
3365
3365
return format
3366
3366
}
3367
3367
format .Value = c .Formula [0 ]
@@ -3514,7 +3514,7 @@ func extractCondFmtExp(c *xlsxCfRule, extLst *xlsxExtLst) ConditionalFormatOptio
3514
3514
// extractCondFmtIconSet provides a function to extract conditional format
3515
3515
// settings for icon sets by given conditional formatting rule.
3516
3516
func extractCondFmtIconSet (c * xlsxCfRule , extLst * xlsxExtLst ) ConditionalFormatOptions {
3517
- format := ConditionalFormatOptions {Type : "iconSet " }
3517
+ format := ConditionalFormatOptions {Type : "icon_set " }
3518
3518
if c .IconSet != nil {
3519
3519
if c .IconSet .ShowValue != nil {
3520
3520
format .IconsOnly = ! * c .IconSet .ShowValue
@@ -3582,11 +3582,11 @@ func drawCondFmtCellIs(p int, ct, GUID string, format *ConditionalFormatOptions)
3582
3582
StopIfTrue : format .StopIfTrue ,
3583
3583
Type : validType [format .Type ],
3584
3584
Operator : ct ,
3585
- DxfID : & format .Format ,
3585
+ DxfID : intPtr ( format .Format ) ,
3586
3586
}
3587
3587
// "between" and "not between" criteria require 2 values.
3588
3588
if ct == "between" || ct == "notBetween" {
3589
- c .Formula = append (c .Formula , []string {format .Minimum , format .Maximum }... )
3589
+ c .Formula = append (c .Formula , []string {format .MinValue , format .MaxValue }... )
3590
3590
}
3591
3591
if idx := inStrSlice ([]string {"equal" , "notEqual" , "greaterThan" , "lessThan" , "greaterThanOrEqual" , "lessThanOrEqual" , "containsText" , "notContains" , "beginsWith" , "endsWith" }, ct , true ); idx != - 1 {
3592
3592
c .Formula = append (c .Formula , format .Value )
@@ -3604,7 +3604,7 @@ func drawCondFmtTop10(p int, ct, GUID string, format *ConditionalFormatOptions)
3604
3604
Bottom : format .Type == "bottom" ,
3605
3605
Type : validType [format .Type ],
3606
3606
Rank : 10 ,
3607
- DxfID : & format .Format ,
3607
+ DxfID : intPtr ( format .Format ) ,
3608
3608
Percent : format .Percent ,
3609
3609
}
3610
3610
if rank , err := strconv .Atoi (format .Value ); err == nil {
@@ -3621,8 +3621,8 @@ func drawCondFmtAboveAverage(p int, ct, GUID string, format *ConditionalFormatOp
3621
3621
Priority : p + 1 ,
3622
3622
StopIfTrue : format .StopIfTrue ,
3623
3623
Type : validType [format .Type ],
3624
- AboveAverage : & format .AboveAverage ,
3625
- DxfID : & format .Format ,
3624
+ AboveAverage : boolPtr ( format .AboveAverage ) ,
3625
+ DxfID : intPtr ( format .Format ) ,
3626
3626
}, nil
3627
3627
}
3628
3628
@@ -3634,7 +3634,7 @@ func drawCondFmtDuplicateUniqueValues(p int, ct, GUID string, format *Conditiona
3634
3634
Priority : p + 1 ,
3635
3635
StopIfTrue : format .StopIfTrue ,
3636
3636
Type : validType [format .Type ],
3637
- DxfID : & format .Format ,
3637
+ DxfID : intPtr ( format .Format ) ,
3638
3638
}, nil
3639
3639
}
3640
3640
@@ -3722,7 +3722,7 @@ func drawCondFmtExp(p int, ct, GUID string, format *ConditionalFormatOptions) (*
3722
3722
StopIfTrue : format .StopIfTrue ,
3723
3723
Type : validType [format .Type ],
3724
3724
Formula : []string {format .Criteria },
3725
- DxfID : & format .Format ,
3725
+ DxfID : intPtr ( format .Format ) ,
3726
3726
}, nil
3727
3727
}
3728
3728
@@ -3774,7 +3774,7 @@ func drawCondFmtIconSet(p int, ct, GUID string, format *ConditionalFormatOptions
3774
3774
cfRule .IconSet .IconSet = format .IconStyle
3775
3775
cfRule .IconSet .Reverse = format .ReverseIcons
3776
3776
cfRule .IconSet .ShowValue = boolPtr (! format .IconsOnly )
3777
- cfRule .Type = format .Type
3777
+ cfRule .Type = validType [ format .Type ]
3778
3778
return cfRule , nil
3779
3779
}
3780
3780
0 commit comments