Sort Range
sort_rangeSort a selectable Excel range by any column, choosing ascending order and whether the first row is a header, to reorder data directly in the active workbook.
Instructions
Sort a range by one column.
Args: workbook: Workbook name or path (None = active workbook). sheet: Worksheet name (None = active sheet). range_address: The range to sort, e.g. "A1:C10". key_column: 1-based column offset within range_address to sort by (1 = the range's leftmost column). ascending: Sort direction. has_header: Whether the range's first row is a header (excluded from sorting, kept in place).
Returns: JSON confirmation.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sheet | No | ||
| workbook | No | ||
| ascending | No | ||
| has_header | No | ||
| key_column | No | ||
| range_address | No | A1 |