Excel Converter (CSV & JSON) · Tutorial

How to make an Excel workbook with several sheets from JSON

6 min readintermediateUpdated

You need to send a colleague two related tables, such as orders and customers, and you have them as JSON. This tutorial shows how to shape the JSON so the converter creates one Excel workbook with a named sheet for each table, nested fields flattened into columns.

What you need

  • The Excel Converter, set to JSON → Excel
  • Your JSON data, or the sample from the Try it button
  • Any spreadsheet program to open the result

Steps

  1. Shape the JSON as named lists

    Put each table in its own array, and the arrays in one object. The keys become the sheet names. The sample has an Orders list and a Customers list.

    {
      "Orders": [ { "id": "SO-1041", "total": 294 }, ... ],
      "Customers": [ { "id": "C-001", "name": "Amara Okafor" }, ... ]
    }
  2. Paste it into the converter

    Paste the JSON into the left box. The message reads Ready: 7 rows in 2 sheets (Orders, Customers). The row count includes each sheet's header row.

  3. Check the preview

    The preview shows the first sheet, Orders, with columns id, customer, total and status. Totals such as 454.93 are numbers, so Excel can add them up.

  4. See how nested fields are handled

    In the Customers list, each person has a nested contact object. In the workbook it becomes a column named contact.email. Any number of nested levels are flattened the same way.

  5. Download and open

    Press Download .xlsx and open the file. You see two tabs at the bottom, Orders and Customers. You can now add a lookup, a pivot table or a chart across them.

Try it yourself

Opens the Excel Converter (CSV & JSON) with this tutorial's sample loaded.

Try it now

Common mistakes

Mixing arrays and other values at the top level
Only an object whose values are all arrays becomes several sheets. If you add "page": 1 next to the lists, the whole object is written as a single row. Remove the extra keys first.
Sheet names Excel does not allow
Names longer than 31 characters or containing / \ ? * [ ] are shortened and cleaned automatically, which can surprise you. Choose short, plain keys.
Numbers stored as strings
"total": "294" stays text in Excel, so sums ignore it. Write numbers without quotes in the JSON when you want to calculate with them.

Next steps

Go back to the Excel Converter (CSV & JSON), or keep going with one of these:

FAQ

Is there a limit on rows?

Each sheet can hold up to 1,048,576 rows, Excel's own limit. In practice your device's memory sets the limit for very large files.

Can I control the column order?

Columns follow the order in which keys first appear in the records. Reorder the keys in the first record to change it.