ApiColorScale
Class representing a color scale conditional formatting rule.
ApiColorScale is a subclass of ApiFormatCondition.
Properties
| Name | Type | Description |
|---|---|---|
| ColorScaleCriteria | ApiColorScaleCriterion[] | Returns the collection of criteria that define this color scale rule. |
| Type | XlFormatConditionType | Returns the type of the color scale conditional formatting rule. |
Methods
The following table lists the available methods.
| Method | Returns | Description |
|---|---|---|
| Delete | None | Deletes the color scale conditional formatting rule. |
| GetAppliesTo | ApiRange | Returns the range of cells to which the current conditional formatting rule applies. |
| GetColorScaleCriteria | ApiColorScaleCriterion[] | null | Returns the collection of criteria that define this color scale rule. |
| GetDateOperator | XlTimePeriods | null | Returns the date operator for time period conditions. |
| GetFillColor | ApiColor | 'No Fill' | Returns the background color for the format condition. |
| GetFont | ApiFont | null | Returns the font applied by the current format condition. |
| GetFormula1 | string | Returns the first formula used by the current conditional formatting rule. |
| GetFormula2 | string | Returns the second formula used by the current conditional formatting rule. |
| GetNumberFormat | string | Returns the number format applied to a cell when the conditional formatting rule evaluates to true. |
| GetOperator | XlFormatConditionOperator | Returns the format condition operator. |
| GetPTCondition | PTCondition | null | Returns the pivot table condition object. |
| GetParent | ApiRange | Returns the parent range object of the current format condition. |
| GetPriority | number | Returns the priority value of the conditional formatting rule. |
| GetScopeType | XlPivotConditionScope | Returns the scope type of the conditional formatting rule. |
| GetStopIfTrue | boolean | Returns whether the editor will stop evaluating additional formatting rules if this rule evaluates to true. This rule type cannot stop the evaluation, so the value can be changed only by opening a file where it is set. |
| GetText | string | Returns the text value used in text-based conditional formatting rules. |
| GetTextOperator | XlContainsOperator | null | Returns the text operator for text-based conditional formatting rules. |
| GetType | XlFormatConditionType | Returns the type of the color scale conditional formatting rule. |
| Modify | ApiFormatCondition | null | Modifies the current format condition with the specified parameters. |
| ModifyAppliesToRange | None | Modifies the cell range to which the current conditional formatting rule applies. |
| SetBorders | None | Sets the border style for the conditional formatting rule. |
| SetDateOperator | None | Sets the date operator for time period conditions. |
| SetFillColor | None | Sets the background color to the format condition with the previously created color object. |
| SetFirstPriority | None | Sets the priority value for the current conditional formatting rule to "1" so that it will be evaluated before all other rules on the worksheet. |
| SetLastPriority | None | Sets the evaluation order for the current conditional formatting rule so it is evaluated after all other rules on the worksheet. |
| SetNumberFormat | None | Sets the number format applied to a cell when the conditional formatting rule evaluates to true. |
| SetPriority | None | Sets the priority value for the conditional formatting rule. |
| SetScopeType | None | Sets the scope type for the conditional formatting rule. |
| SetStopIfTrue | None | Sets whether the editor will stop evaluating additional formatting rules if this rule evaluates to true. |
| SetText | None | Sets the text value used in text-based conditional formatting rules. |
| SetTextOperator | None | Sets the text operator for text-based conditional formatting rules. |