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

# Convert Excel to JSON

`POST /api/excel/to-json`

## Request

- Base URL: `https://api.dokmatiq.com`
- URL: `https://api.dokmatiq.com/api/excel/to-json`
- Auth: API key in header `X-API-Key`

Extract data from an Excel sheet and return structured JSON with headers and typed values.

## Request body

- ExcelConvertRequest: Request to convert data between Excel and other formats (CSV, JSON)
  - `excelBase64` string: Base64-encoded Excel file (for XLSX → CSV/JSON conversion)
  - `csvContent` string: CSV content (for CSV → XLSX conversion)
  - `delimiter` string: CSV delimiter character
  - `quoteChar` string: CSV text qualifier / quote character
  - `hasHeader` boolean: Whether the CSV has a header row
  - `sheetName` string: Sheet name for CSV → XLSX conversion
  - `sheetIndex` integer: Sheet index to read (0-based, for multi-sheet XLSX)

## Response `200`

JSON data

## Other responses

- `400`: Invalid request

---

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