Tag: data

  • How to convert Excel to JSON

    To convert Excel to JSON, open the .xlsx in a converter that reads each cell’s type, and save as JSON. In the JFDI file converter, drop in the spreadsheet, choose JSON and download. Each row becomes an object with the header row as its keys; numbers stay numbers, dates become ISO strings like 2024-03-25, and codes such as 00123 stay text.

    What you get

    A sheet like this:

    Order IDDateAmountPostcode
    0012325/03/20241,250.50SW1A 1AA

    becomes:

    [
      {
        "Order ID": "00123",
        "Date": "2024-03-25",
        "Amount": 1250.5,
        "Postcode": "SW1A 1AA"
      }
    ]

    Notice what’s preserved: the leading zeros in the order ID, the date in an unambiguous format, and the amount as a real number without the thousands separator.

    Workbooks with several sheets

    With one sheet, you get an array of rows. With several, you get an object with a key per sheet name, each holding that sheet’s rows. Choose Sheets › First only for just the first.

    Options

    • Easy to read (indented): pretty-printed with two-space indents. Untick for compact output.
    • Turn columns like address.city into nested objects: columns named with dots become nested objects, so address.city and address.postcode turn into "address": { "city": …, "postcode": … }.
    • JSON Lines (pick it instead of JSON under Convert to): one object per line, the format many data tools and databases prefer for large files. With several sheets, each line gets a sheet field.

    Going the other way

    JSON to Excel or CSV works too. Nested data is spread into columns named by their path, such as address.city, and lists of simple values are joined with semicolons. Between JSON, XML and YAML, tick Keep the nested structure to convert the data as it is rather than as a table.

    Why not just save as CSV and convert that?

    Because CSV loses the types: every value is text, and whatever reads it has to guess again. Going straight from Excel keeps what Excel knew: which cells are numbers, which are dates, and which are text that only looks like a number.

    Is it safe for real data?

    Yes. The file is read and converted in your browser and never uploaded, which matters for customer lists and exports from internal systems. There’s no file-size limit beyond your device’s memory, and no limit on how many files you convert.

    Related