In Excel: convert a worksheet to JSON by exporting the range with headers and mapping each data row to one object whose keys are the header cells — or use Power Query (Data ▸ Get Data ▸ From File ▸ From JSON) for the reverse direction.
2 records
What this does
JSON stores records as objects with named fields, while a worksheet stores them as rows under header cells. Converting between the two means deciding which row holds the field names and how empty cells should appear (empty string vs. missing key). Excel itself has no one-click "save as JSON"; Power Query imports JSON, but exporting requires a tool or script. The same idea underpins a lot of everyday Excel work, so the few minutes spent getting it right here pay back across every sheet you build afterwards. Treat it as a pattern, not a one-off, and it stops being something you look up and starts being something you reach for. Treat “json to excel table” as a small repeatable workflow rather than a one-off click you hope to remember next time. Use a small test block before the live file, so any surprise in the affected cells shows up while it is still harmless. When this is a ribbon command, the selection matters more than the button: confirm the range, apply the command, then spot-check the output before saving. That turns a layout choice that keeps the sheet readable and sortable into a method you can reuse, explain, and defend when the workbook leaves your screen.
A worked example
A sheet has headers name and qty in row 1, with Bolt M8 / 42 in row 2 and Nut M8 / 120 in row 3. Converted with the first row as headers, the output is [{"name":"Bolt M8","qty":"42"},{"name":"Nut M8","qty":"120"}] — two records, keys taken from row 1. APIs, config files, and most web tooling speak JSON. Converting a worksheet to JSON lets spreadsheet data feed scripts and apps without manual re-typing. One habit worth forming early: name the cells that hold your inputs, so the formula reads in plain language instead of a string of cell addresses. A reviewer — or you in three months — can then follow the logic without decoding what B7 and D2 were supposed to mean, which is most of what makes a sheet maintainable.
In Google Sheets
Google Sheets handles this almost identically to Excel. The formula syntax above is the same, and the menu lives under a slightly different label rather than a ribbon tab. Use the platform toggle at the top of the page to switch every keyboard shortcut between Windows and Mac, and expect at most cosmetic differences in naming. Keep this page bookmarked for the next time the same question comes up. Better still, rebuild the example once in your own sheet — doing it yourself, with the tool above to check against, is what turns a copied formula into a technique you own. Here is the takeaway for “json to excel table”: copy the answer if you are busy, but if you have a spare few minutes, rebuild the example in Excel yourself with the tool above open beside it. That single pass — type it, run it, watch the result move when you change an input — is what turns a formula you found into a technique you trust. Keep your inputs labelled and referenced, never hard-coded, and the same sheet stays correct and auditable as it grows. Done that way, you will not need to look this up again, and you will be the person others ask.
Common mistakes
- Merged header cells, which leave some columns without a key.
- Expecting Excel's Save As dialog to offer JSON — it does not; you need a converter or script.
- Forgetting that all cell values arrive as text; cast numbers in the consuming code.
- Using a sheet where the real headers start in row 3 — move them to row 1 first.
Frequently asked questions
Can Excel save a file as JSON directly?
No. Save As has no JSON option. Use a converter like the one above, Power Automate, or a script (Office Scripts, Python).
How do I open a JSON file in Excel?
Data ▸ Get Data ▸ From File ▸ From JSON, then expand the records into columns in Power Query and Close & Load.
Does the converter upload my spreadsheet?
No. The conversion runs entirely in your browser; the file never leaves your machine.