export_table
Export a Word table to CSV or JSON, preserving merged-cell layout and flattening nested tables. Choose file output or inline data without modifying the document.
Instructions
Export a body-level table (list_tables index) to CSV or JSON as a rows x grid-columns matrix. Merged cells keep their value in the anchor (top-left) position with empty strings in the covered positions; include_merges adds the merge topology as {row, col, rowspan, colspan} entries (inside the JSON document; as a report field alongside CSV). Nested tables are flattened into the host cell's text and flagged. output_path=None returns the data inline ('csv' string / 'data' rows) instead of writing a file; an existing output file is refused. The document itself is never modified.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| format | No | csv | |
| file_path | Yes | ||
| output_path | No | ||
| table_index | Yes | ||
| include_merges | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||