sort_table
Sort table rows by column content, preserving header rows. Specify table index, column index, and sort order.
Instructions
Sort the non-header rows of a table by the text content of a column.
Header rows (marked with w:tblHeader) remain at the top. Rows with a missing cell at column_index sort as empty string.
Args: table_idx: 0-based table index. column_index: 0-based column to sort by. ascending: True for A→Z (default), False for Z→A.
Returns: {"sorted_rows": int, "column_index": int, "ascending": bool}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ascending | No | ||
| table_idx | Yes | ||
| column_index | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |