MCP
format:setBandedRange
Sets the banded range.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
sheet | string | yes | — |
range | { from: string; to: string } | yes | An inclusive rectangle. from/to may be equal, a single cell. |
style | { headerColor?: string or null; firstBandColor: string; secondBandColor: string; footerColor?: string or null } | yes | The wire shape of a banded range's color assignment. |
Returns
| Name | Type | Required | Description |
|---|---|---|---|
range | { from: string; to: string } | yes | An inclusive rectangle. from/to may be equal, a single cell. |
id | string | yes | The new banded range's id. |
Schema
Request payload, as JSON Schema:
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Payload",
"type": "object",
"properties": {
"sheet": {
"type": "string"
},
"range": {
"$ref": "#/$defs/CellRange"
},
"style": {
"$ref": "#/$defs/StyleWire"
}
},
"required": [
"sheet",
"range",
"style"
],
"$defs": {
"CellRange": {
"description": "An inclusive rectangle. `from`/`to` may be equal, a single cell.",
"type": "object",
"properties": {
"from": {
"description": "Top-left cell, e.g. `\"A1\"`.",
"type": "string"
},
"to": {
"description": "Bottom-right cell, e.g. `\"B3\"`.",
"type": "string"
}
},
"required": [
"from",
"to"
]
},
"StyleWire": {
"description": "The wire shape of a banded range's color assignment.",
"type": "object",
"properties": {
"headerColor": {
"anyOf": [
{
"$ref": "#/$defs/HexColor"
},
{
"type": "null"
}
],
"default": null
},
"firstBandColor": {
"$ref": "#/$defs/HexColor"
},
"secondBandColor": {
"$ref": "#/$defs/HexColor"
},
"footerColor": {
"anyOf": [
{
"$ref": "#/$defs/HexColor"
},
{
"type": "null"
}
],
"default": null
}
},
"required": [
"firstBandColor",
"secondBandColor"
]
},
"HexColor": {
"description": "A strictly-validated `#rgb`/`#rrggbb`/`#rrggbbaa` hex colour.",
"type": "string"
}
}
}Response payload, as JSON Schema:
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Output",
"type": "object",
"properties": {
"range": {
"$ref": "#/$defs/CellRange"
},
"id": {
"description": "The new banded range's id.",
"type": "string"
}
},
"required": [
"range",
"id"
],
"$defs": {
"CellRange": {
"description": "An inclusive rectangle. `from`/`to` may be equal, a single cell.",
"type": "object",
"properties": {
"from": {
"description": "Top-left cell, e.g. `\"A1\"`.",
"type": "string"
},
"to": {
"description": "Bottom-right cell, e.g. `\"B3\"`.",
"type": "string"
}
},
"required": [
"from",
"to"
]
}
}
}