add_conditional_format
Adds a conditional formatting rule to a worksheet range using cell-value comparisons, color scales, data bars, or icon sets to highlight data automatically.
Instructions
Add a conditional formatting rule to a range. Supports cellValue (compare with a formula and fill on match), colorScale (min/max gradient), dataBar, and iconSet rules.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| range | Yes | A1 range address. | |
| formula1 | No | cellValue: comparison value/formula, e.g. "0" or "=TODAY()". | |
| formula2 | No | cellValue: second bound for Between/NotBetween. | |
| maxColor | No | colorScale: maximum color. Default "#63BE7B". | |
| minColor | No | colorScale: minimum color. Default "#F8696B". | |
| operator | No | cellValue: comparison operator. | |
| ruleType | Yes | Type of rule. | |
| fillColor | No | cellValue: fill color on match, as #RRGGBB. Default "#FFC7CE". | |
| sheetName | No | Worksheet name. Defaults to the active worksheet. | |
| workbookId | No | Target workbook ID from list_workbooks. Optional when only one workbook is connected. | |
| iconSetStyle | No | iconSet: icon set style. Default ThreeTrafficLights1. |