add_conditional_format
Apply conditional formatting rules (data bars, color scales, threshold comparisons, duplicates) to specified cell ranges in Excel files.
Instructions
添加条件格式(openpyxl 原生规则,真实生效)。
cond_type 可选:
data_bar:数据条(无需 value)
color_scale:色阶(无需 value)
greater_than / less_than / equal:需要 value
between:需要 value 与 value2
duplicate:高亮重复值(无需 value)
参数:
cell_range:作用区域,如 "C2:C100"
value / value2:阈值
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"file_path": "<file_path>",
"cell_range": "<cell_range>",
"cond_type": "<cond_type>"
},
"name": "add_conditional_format"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sheet | No | ||
| value | No | ||
| value2 | No | ||
| cond_type | Yes | ||
| file_path | Yes | ||
| cell_range | Yes |