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).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| range | Yes | ||
| by_column | Yes | ||
| descending | No | ||
| has_header | No | ||
| session_id | Yes |