sort_table
Sort non-header rows of a Word table by a specified column, preserving header rows. Choose column index and ascending 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 |
|---|---|---|---|
| table_idx | Yes | ||
| column_index | Yes | ||
| ascending | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |