TRUECALC
MCP

file:export

Exports a workbook file.

Parameters

NameTypeRequiredDescription
sheetstringyesThe sheet named on the wire, validated to exist for every format.
format"json", "csv", "xlsx"yesEvery variant PARSES.

Returns

NameTypeRequiredDescription
format"json", "csv", "xlsx"yesEvery variant PARSES.
contentstringyes

Schema

Request payload, as JSON Schema:

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Payload",
  "description": "`commandId` is dropped, the same Batch-0 convention `edit::set_cell::Payload` already uses.",
  "type": "object",
  "properties": {
    "sheet": {
      "description": "The sheet named on the wire, validated to exist for every `format`.",
      "type": "string"
    },
    "format": {
      "$ref": "#/$defs/Format"
    }
  },
  "required": [
    "sheet",
    "format"
  ],
  "$defs": {
    "Format": {
      "description": "Every variant PARSES.",
      "type": "string",
      "enum": [
        "json",
        "csv",
        "xlsx"
      ]
    }
  }
}

Response payload, as JSON Schema:

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Output",
  "description": "`file:export`'s typed result.",
  "type": "object",
  "properties": {
    "format": {
      "$ref": "#/$defs/Format"
    },
    "content": {
      "type": "string"
    }
  },
  "required": [
    "format",
    "content"
  ],
  "$defs": {
    "Format": {
      "description": "Every variant PARSES.",
      "type": "string",
      "enum": [
        "json",
        "csv",
        "xlsx"
      ]
    }
  }
}

On this page