export_range
Export a range, table, or sheet to CSV, TSV, or JSON with cached or formula values. Handles file output with overwrite protection and returns inline text when no file is specified.
Instructions
Export a range, table, or sheet to CSV, TSV, or JSON. location defaults to the true used range; {table} exports a table. values is cached | formula | both; the result states the mode used. out_file writes a file; otherwise text returns inline. The target is guarded: never the source workbook, a workbook extension, a reserved device name, or .ks4xl-backups; an existing file needs overwrite, which keeps a .bak first. Filter-hidden rows export like any other row. Multi-sheet is export_file, io pack. Read-only.
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 |