---
title: "Convert an Excel sheet to JSON"
method: POST
path: "/excel-to-json"
tags: ["Documents"]
---

# Convert an Excel sheet to JSON

`POST /excel-to-json`

## Request

- Base URL: `https://api.cofferdock.com`
- URL: `https://api.cofferdock.com/excel-to-json`
- Auth: API key in header `x-api-key`

Reads one sheet of an .xlsx workbook into an array of objects (or arrays with header=false). Formulas come through as their calculated result. A column with an empty header cell is named col_N (N = its position in the sheet, from 1) and a repeated header gets _2, _3... so no column is lost. Cells to the right of the last header cell are ignored. Up to 1,000 columns.

Costs 1 credit per call.

## Request body

- object
  - `file` string, byte, required: The Excel workbook to read, as a base64-encoded .xlsx file (the older .xls format is not supported).
  - `sheet` string: Sheet name or 0-based index. Default: first sheet.
  - `header` boolean: true (default) = the first row holds the column names, so each row becomes an object (an empty header cell becomes col_N and a repeated name gets _2, _3...); false = each row becomes an array of values.

## Response `200`

Result.

- object
  - `success` boolean
  - `data` unknown[]
    - unknown
  - `meta` object
    - `sheet` string
    - `sheets` string[]
    - `rows` integer
    - `used` integer: Credits used this month, after this call.
    - `remaining` integer, nullable: Credits left this month (null = unlimited).
    - `unlimited` boolean

## Other responses

- `400`: Invalid input (nothing is charged).
- `401`: Missing or invalid API key.
- `403`: Email not verified.
- `429`: Monthly credit limit reached, or too many requests per minute for this key (see Retry-After).
- `503`: Server busy (queue full). Retry after the seconds in the Retry-After header.

---

[API](https://skmtc.dev/cofferdock/apis/cofferdock-api.md) · [All operations](https://skmtc.dev/cofferdock/apis/cofferdock-api/llms.txt) · [OpenAPI document](https://skmtc.dev/cofferdock/apis/cofferdock-api/revisions/b57aa000d33a?raw)
