JSON to Excel
json_to_excelUse this when the user wants to convert JSON to Excel or CSV, turn an API response or a JSON export into a spreadsheet, or flatten nested JSON into columns. Takes one attached .json file or pasted json_text, an optional records_path (e.g. data.items) and orient (records, columns, index), and how to handle lists (scalar_arrays join or rows, object_arrays sheet or json). Returns an .xlsx and a .csv download (a ZIP of CSVs when there are linked sheets), the rows, columns and cells written, the numbers kept as text, formula-like text, and a check that each cell was read back from both files. Does not accept JSON with comments, trailing commas or JSON Lines, and does not turn date text into Excel dates. Do not use for Excel to JSON or for editing a JSON file.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | No | The JSON file to convert, e.g. orders.json (UTF-8, or UTF-16 with a byte order mark), up to 5 MB. | |
| orient | No | How records are laid out, e.g. records. records (default): a list of objects, one row each (a single object is one row). columns: an object of equal-length lists, {"name":["Ann","Bo"],"age":[31,40]}. index: an object of objects keyed by id, {"u1":{...},"u2":{...}}; the key goes in column _key. | |
| csv_bom | No | true (default): the CSV starts with a UTF-8 byte order mark so Excel shows accents correctly. false: plain UTF-8. | |
| json_text | No | Instead of a file: the JSON itself, e.g. [{"name":"Ann","age":31},{"name":"Bo","age":40}]. Use either file or json_text. | |
| records_path | No | Dotted key path to the part that holds the records, e.g. "data.items" for {"data":{"items":[...]}}. Use a number for a list item, e.g. "results.0.rows". Default: the whole document. | |
| object_arrays | No | Lists that hold objects, such as order lines, e.g. sheet. sheet (default): a linked sheet with one row per item, linked by _parent_row. json: the list as compact JSON text in one cell. | |
| scalar_arrays | No | Lists of plain values such as ["red","blue"], e.g. join. join (default): one cell, values joined with "; ". rows: one row per value in a linked sheet. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cells | Yes | ||
| check | Yes | ||
| notes | Yes | ||
| sheets | Yes | ||
| source | Yes | ||
| columns | Yes | ||
| preview | Yes | ||
| records | Yes | ||
| csv_name | Yes | ||
| csv_files | No | ||
| cut_cells | Yes | ||
| downloads | Yes | ||
| json_cells | Yes | ||
| output_name | Yes | ||
| joined_cells | Yes | ||
| records_from | Yes | ||
| sheets_count | No | ||
| columns_count | No | ||
| preview_count | No | ||
| duplicate_keys | Yes | ||
| numbers_as_text | Yes | ||
| expires_in_hours | Yes | ||
| formula_like_text | Yes | ||
| values_outside_records | Yes | ||
| removed_control_characters | Yes |