---
title: "Export workbook as an .xlsx file"
method: POST
path: "/v1/workbooks/{id}/export"
tags: ["workbooks"]
---

# Export workbook as an .xlsx file

`POST /v1/workbooks/{id}/export`

Export a workbook as an .xlsx file. Cells can be updated before the
workbook is exported.

## Path parameters

- `id` string, required

## Request body

- ExportRequest — Request body for exporting a workbook as an .xlsx file. Cells can be updated before reading the workbook, and a goal seek function can be used to calculate the required input value for a formula to achieve a specified target result.
  - `apply` DataTransformation[], nullable — Cells to update before exporting.
    - `target` union, required — Reference for the cell to write to
      - string — A1-style string reference with optional sheet prefix
      - ReferenceObject — A reference to a range of spreadsheet cells.
        - `cells` string, required — Unprefixed A1-style range, id, or name
        - `sheet` string, nullable, required — Name of the sheet to reference
    - `value` union, required — Value to write to the target cell
      - integer
      - number
      - string
      - boolean
  - `goalSeek` QueryRequestGoalSeek — Goal seek. Use this to calculate the required input value for a formula to achieve a specified target result. This is particularly useful when the desired outcome is known, but the corresponding input is not.
    - `targetCell` union, required — Reference for the cell that contains the formula you want to resolve
      - string — A1-style string reference with optional sheet prefix
      - ReferenceObject — A reference to a range of spreadsheet cells.
        - `cells` string, required — Unprefixed A1-style range, id, or name
        - `sheet` string, nullable, required — Name of the sheet to reference
    - `targetValue` union, required — The value you want the formula to return
      - integer
      - number
    - `controlCell` union, required — Reference for the cell that will contain the solution
      - string — A1-style string reference with optional sheet prefix
      - ReferenceObject — A reference to a range of spreadsheet cells.
        - `cells` string, required — Unprefixed A1-style range, id, or name
        - `sheet` string, nullable, required — Name of the sheet to reference

## Response `200`

Workbook exported as an .xlsx file

## Other responses

- `400` — Error returned when you make a bad request
- `403` — Error returned when you don't have permission to query a workbook
- `429` — Error returned when you exceed your API rate limit

---

[API](https://skmtc.net/grid-is/apis/grid-api.md) · [All operations](https://skmtc.net/grid-is/apis/grid-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/grid-is/grid-api/versions/2f55490ab23d/schema)
