export_range
Export a range, table, or sheet to CSV, TSV, or JSON. Select cached or formula values, output to file or inline, with safe overwrite protection.
Instructions
Export a range, table, or sheet to CSV, TSV, or JSON. location defaults to the sheet's true used range; {table} exports a table. values is cached | formula | both; the result states the mode used. out_file writes to a file; otherwise text returns inline. The target is guarded: never the source workbook, a workbook extension, or .ks4xl-backups; an existing file refuses unless overwrite is true, which first keeps a timestamped .bak. Multi-sheet export is export_file (io pack). Read-only; the workbook never changes.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fmt | No | csv | |
| path | Yes | ||
| sheet | No | ||
| header | No | ||
| values | No | cached | |
| records | No | ||
| location | No | ||
| out_file | No | ||
| overwrite | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||