export_form_excel
Export a Nettskjema form's submission data to an Excel file written to disk. Provide form_id and optional output_path; returns absolute path or temp file.
Instructions
Export a form's submission data to a file, written to disk.
The spec documents this route's response as an Excel file. The file is streamed to disk and never inlined: a multi-megabyte spreadsheet as base64 is useless to a model. The returned path is absolute and tilde-expanded. An existing file at the output path is silently overwritten, and its mode is preserved. A new file (whether from output_path or a temp file) is created with mode 0600 (readable only by the current user).
When output_path is omitted, a temporary file is created in the system temp directory with a suffix derived from the response's media type. The temporary file persists after this call returns and is left on disk for the caller to use or delete.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"form_id": "<form_id>"
},
"name": "export_form_excel"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| form_id | Yes | The form's numeric ID. | |
| output_path | No | Destination file path. When omitted, a temporary file is created in the system temp directory. The path may contain ~ for the home directory and may be relative (it will be resolved to an absolute path). | |
| optimize_for_large_data | No | Request optimization for large datasets. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |