Tools API Blog
Sign in Create account

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

OptionDefaultWhat it does
data-Required. Array of objects.
sheet_nameSheet1Sheet 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.
headertrueInclude the column-name row.
escape_formulasfalseSet 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.
outputjsonjson (the Excel file in base64), xlsx (the file itself) or url (a download link valid for 15 minutes).

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 data is an object with a key such as formula, or with text and hyperlink, 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+1 is 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.