xtract.bot
POST /api/json-to-xlsx

Generate an .xlsx Excel workbook from a JSON array. One sheet per array, header row from object keys. Compatible with Excel, LibreOffice Calc, and Numbers.

Builds an Excel workbook (.xlsx) from a JSON array of objects. Header row is derived from the keys of the first record; subsequent rows are populated by looking up the same keys in each subsequent object. The output is a standard .xlsx file that opens cleanly in Excel, LibreOffice Calc, Google Sheets, and Numbers. Pass `sheetName` to override the default sheet name (`Sheet1`).

Inputs

NameTypeDefaultDescription
rows*stringJSON array of rows — either array-of-objects (header inferred from keys) or array-of-arrays (raw cells, no header).
sheetNamestring"Sheet1"Name of the sheet in the generated workbook (max 31 chars per the XLSX spec).

Response

Modes: binary, base64-json. Cache: yes (24h TTL).

Code samples

Built from the objects example.


curl -X POST https://api.xtract.bot/api/json-to-xlsx \
  -H "Content-Type: application/json" \
  -H "Accept: application/octet-stream" \
  -H "X-Account-Id: $XTRACT_ACCOUNT_ID" \
  -H "X-Api-Key: $XTRACT_API_KEY" \
  -d '{
  "rows": "[{\"name\":\"Alice\",\"age\":30},{\"name\":\"Bob\",\"age\":25},{\"name\":\"Carol\",\"age\":42}]",
  "sheetName": "People"
}'