Skip to main content

Export Workbook

Available September 2026 and later.

Exports the workbook open in Tableau Studio to a file at filePath, leaving the open document unchanged. The write is headless: no Save As dialog appears, and the tool result names the path rather than returning the file's bytes. format chooses the output:

  • pdf — PDF (.pdf)
  • powerpoint — PowerPoint (.pptx)
  • packaged-workbook — packaged workbook (.twbx)
  • prior-version — a down-saved copy for an older release (.twb or .twbx); also pass targetVersion
Destructive

This tool is not read-only. The open workbook is left unchanged, but Tableau Studio always writes to filePath and overwrites any file already there.

APIs called​

This tool acts on the workbook open in the local Tableau Studio instance, not on the Tableau Cloud or Tableau Server REST API. Under the hood these are calls to the local Tableau Studio External Client API — a REST API the running Tableau Studio instance serves at http://127.0.0.1:<port>/v<x>, where <x> is the latest API version. There are no OAuth scopes: each call is authorized by the running Tableau Studio instance's per-session bearer token over the loopback interface. A workbook must be open in the target session.

  • Settles on which Tableau Studio session to target before anything is sent. Resolved in-process (not an API call).
  • Exports the open workbook to filePath in the requested format. The request body carries format, filePath, and — when format is prior-version — targetVersion. Tableau Studio writes the file itself; the open workbook is left as it was. Requires a connected Tableau Studio session with an open workbook; authorized by that session's loopback bearer token.
    • POST /v<x>/workbook:exportAs — export the open workbook to a file. API reference

Required arguments​

format​

Export format. Type: enum. One of pdf, powerpoint, packaged-workbook, or prior-version. The extension on filePath must match this value:

  • pdf — .pdf
  • powerpoint — .pptx
  • packaged-workbook — .twbx
  • prior-version — .twb or .twbx. Also requires targetVersion. Writes a down-saved copy of the open workbook for the release you name, without changing the workbook that stays open

Example​

{ "format": "pdf", "filePath": "/Users/me/Book.pdf" }

filePath​

Absolute path for Tableau Studio to write the export to. Type: string; must be non-empty. The extension must match format as listed under format.

The path is forwarded as you give it. Tableau Studio is the authority on whether the path is an acceptable absolute path and on the extension-to-format match; when either check fails, Tableau Studio rejects the call and nothing is written. A mismatch is still sent — the refusal comes back from Tableau Studio, not from a pre-flight check in the tool.

The write overwrites any file already at that path, with no prompt. The tool result reports the path; the exported bytes do not come back in the conversation.

Example​

{ "format": "powerpoint", "filePath": "/Users/me/Book.pptx" }

Optional arguments​

targetVersion​

Release to down-save to, as a customer-facing release string such as "2024.1". Type: string; must be non-empty.

Required when format is prior-version. A prior-version call that omits it is refused with Exporting to a prior version requires targetVersion (e.g. "2024.1"). and never reaches Tableau Studio.

On every other format the tool drops targetVersion before sending the request, so a leftover value is not forwarded.

Whether the string names a known release is validated by Tableau Studio. An unrecognized value is rejected there, and no file is written.

Example​

{ "format": "prior-version", "filePath": "/Users/me/Old.twb", "targetVersion": "2024.1" }

session​

Identifier of the target Tableau Studio session. When omitted, the session is resolved automatically (for example, when exactly one Tableau Studio instance is connected).

Example​

"studio-1"

Session resolution does not guess

With no session given and no Tableau Studio instance running, or more than one running, the tool reports an error rather than picking one; the multiple-instance error lists the session IDs to choose from. A session that names an instance which is not among the running ones is refused the same way.

Notes and caveats​

  • A request that has been accepted but not finished is reported as such. When Tableau Studio answers before the write has settled, the result says the export was requested and is still being applied instead of claiming the file is already written.

Example results​

Export completed (format: "pdf")​

{ "message": "Exported the workbook to \"/Users/me/Book.pdf\"." }

Export completed (format: "prior-version")​

{ "message": "Exported the workbook to \"/Users/me/Old.twb\"." }

Accepted, still being applied​

{ "message": "Requested exporting the workbook; Desktop is still applying it." }
  • save-workbook — saves the open workbook in place (or a copy) rather than exporting a separate file.
  • export-dashboard-image — renders one dashboard as an image instead of exporting the whole workbook to a file.
  • export-worksheet-image — renders one worksheet as an image instead of exporting the whole workbook to a file.