JSON to Excel
JSON to Excel is an API that converts an array of JSON objects into a real .xlsx file (opens directly in Excel, Google Sheets or Numbers), with columns taken from every object's keys.
How it works
You send data (an array of objects) and get the .xlsx file back. If one object has a field others don't, that column still shows up, blank on the rows where it's missing.
All you need
- Your API key. Create it in your dashboard with "+ Create key".
- In your automation platform, an "HTTP Request" step (n8n, Make, Zapier, Pipedream…).
How to use it in n8n
- Method:
POST· URL:https://api.cofferdock.com/json-to-excel - Send Headers:
x-api-key= your key,Content-Type=application/json - Send Body (JSON):
{ "data": [{"name":"Ana","age":30}] } - In Options → Response → Response Format: choose File
Options
| Option | Default | What it does |
|---|---|---|
data | - | Required. Array of objects. |
sheet_name | Sheet1 | Sheet name (max 31 characters, Excel's own limit). It cannot contain * ? : \ / [ ], start or end with an apostrophe, or be History: those return a 400 error. |
header | true | Include the column-name row. |
escape_formulas | false | Set it to true when the data comes from third parties (forms, emails, web pages). A value that arrives as an object (for example with formula or hyperlink) is written as text instead of becoming a formula or a link, and text starting with =, +, - or @ gets a single quote in front. Through MCP (AI assistants) it is true by default. Details below. |
output | json | json (the Excel file in base64), xlsx (the file itself) or url (a download link valid for 15 minutes). |
API overview
- Endpoint:
POST https://api.cofferdock.com/json-to-excel - Auth:
x-api-key: YOUR_KEY. - Input: JSON ONLY,
{ "data": [...] }. - Engine: exceljs.
- Limits: 30 requests/min per IP. Up to 100,000 rows and 1,000 columns (and 2 million cells, rows × columns). 1 call = 1 credit.
Example
curl -X POST "https://api.cofferdock.com/json-to-excel" \
-H "x-api-key: YOUR_KEY" -H "Content-Type: application/json" \
-d '{"data":[{"name":"Ana","age":30}],"output":"xlsx"}' \
--output data.xlsx
Response
{ "success": true, "xlsx": "UEsDBBQA...",
"mime_type": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
"meta": { "rows": 1, "columns": 2, "used": 12, "remaining": 488 } }
What you get back
By default (JSON): xlsx as base64. Add output=xlsx for the raw binary, or output=url for a temporary link.
If the data comes from third parties
An Excel file can hold formulas and links, and whoever controls a piece of data could slip one in so that someone else's spreadsheet sends information to a website (formula injection). "escape_formulas": true closes both ways in:
- Values shaped like an object. If a value in
datais an object with a key such asformula, or withtextandhyperlink, the file saves it as a real formula or link. With the option on, every object or list is written as JSON text, as already happens with any other object. - Text starting with
=,+,-or@. In the .xlsx they are saved as text and Excel does not run them when the file is opened, but they can end up running if someone copies them into another program or saves the sheet as CSV. With the option on they get a single quote in front (=1+1is written as'=1+1), and so do column names and anything starting with a tab or a carriage return. Numbers are left alone.
It is false by default, so the file comes out exactly as it always did. When the tool is used from an AI assistant through MCP, it is true by default (the assistant can turn it off by sending false). Turn it on as soon as you mix in data you do not control. The quote becomes part of the text and shows up in the spreadsheet: a phone number that arrives as the text +34 600 000 000 would come out as '+34 600 000 000. If a value must stay a number, send it as a number (no quotes). With the option on you cannot send real formulas in data.