The recommended way to manage these rules is via Worksheet#add_conditional_formatting
Conditional formatting rules specify formulas whose evaluations format cells
Creates a new Conditional Formatting Rule object
Above average rule Indicates whether the rule is an “above average” rule. True indicates 'above average'. This attribute is ignored if type is not equal to aboveAverage.
Bottom N rule
colorScale (Color Scale) The color scale to apply to this conditional formatting
dataBar (Data Bar) The data bar to apply to this conditional formatting
Differential Formatting Id
Equal Average Flag indicating whether the 'aboveAverage' and 'belowAverage' criteria is inclusive of the average itself, or exclusive of that value.
Formula The formula or value to match against (e.g. 5 with an operator of :greaterThan to specify cell_value > 5). If the operator is :between or :notBetween, use an array to specify [minimum, maximum]
iconSet (Icon Set) The icon set to apply to this conditional formatting
Operator The operator in a “cell value is” conditional formatting rule. This attribute is ignored if type is not equal to cellIs
Operator must be one of lessThan, lessThanOrEqual, equal, notEqual, greaterThanOrEqual, greaterThan, between, notBetween, containsText, notContains, beginsWith, endsWith
percent (Top 10 Percent) indicates whether a “top/bottom n” rule is a “top/bottom n percent” rule. This attribute is ignored if type is not equal to top10.
Priority The priority of this conditional formatting rule. This value is used to determine which format should be evaluated and rendered. Lower numeric values are higher priority than higher numeric values, where '1' is the highest priority.
rank (Rank) The value of “n” in a “top/bottom n” conditional formatting rule. This attribute is ignored if type is not equal to top10.
stdDev (StdDev) The number of standard deviations to include above or below the average in the conditional formatting rule. This attribute is ignored if type is not equal to aboveAverage. If a value is present for stdDev and the rule type = aboveAverage, then this rule is automatically an “above or below N standard deviations” rule.
stopIfTrue (Stop If True) If this flag is '1', no rules with lower priority shall be applied over this rule, when this rule evaluates to true.
Text used in a “text contains” conditional formatting rule.
timePeriod (Time Period) The applicable time period in a “date occurring…” conditional formatting rule. This attribute is ignored if type is not equal to timePeriod. Valid types are today, yesterday, tomorrow, last7Days, thisMonth, lastMonth, nextMonth, thisWeek, lastWeek, nextWeek
Serializes the conditional formatting rule
Type (ST_CfType) options are expression, cellIs, colorScale, dataBar, iconSet, top10, uniqueValues, duplicateValues, containsText, notContainsText, beginsWith, endsWith, containsBlanks, notContainsBlanks, containsErrors, notContainsErrors, timePeriod, aboveAverage