sort_range
Sort rows in an Excel range by a specified column. Keep headers in place; use stable sorting for multi-key sorts.
Instructions
Sort the rows of a range by one column's values.
by_column is the sheet column letter (e.g. 'B') and must fall inside the range. Set has_header=true if the range's first row is a header to keep in place. Numbers and dates sort before text; blank cells always sort last. Only values move — formatting stays put, and formulas move as text (their relative references are NOT adjusted). For multi-key sorts, call once per key from least to most significant column (the sort is stable).
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": {
"session_id": "<session_id>",
"range": "<range>",
"by_column": "<by_column>"
},
"name": "sort_range"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| range | Yes | ||
| by_column | Yes | ||
| descending | No | ||
| has_header | No | ||
| session_id | Yes |