apply_conditional_formatting
Add conditional formatting to a cell range using color scales, data bars, value-based conditions, or formulas to highlight data automatically.
Instructions
Add a conditional formatting rule to a range.
rule_type:
'color_scale': gradient by value; colors = 2 or 3 hex/named colors (default red-yellow-green).
'data_bar': in-cell bars; colors = [bar_color] (default blue).
'cell_value': highlight cells matching operator (greaterThan, lessThan, equal, notEqual, between, notBetween, greaterThanOrEqual, lessThanOrEqual) against values (two values for between); uses fill_color/font_color.
'formula': highlight where an Excel formula (relative to the range's top-left cell) is TRUE, e.g. 'ISBLANK(A2)'; uses fill_color/font_color.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| range | Yes | ||
| colors | No | ||
| values | No | ||
| formula | No | ||
| operator | No | ||
| rule_type | Yes | ||
| fill_color | No | light_red | |
| font_color | No | ||
| session_id | Yes |