Power Query Problems

How to Import Nested Text or JSON Data into Excel Columns Using Power Query

Elise WilliamsElise Williams Nov 10, 2026 869 views

Question details

The user needs to parse a text file containing nested square-bracket blocks and quoted phrases into separate columns in Excel.

How to Parse and Import Nested Text or JSON Data into Excel Columns
Product
Microsoft Excel
Device & OS
not provided
Scenario
Importing structured text with custom brackets or JSON data into a flat, tabular format for analysis.
Observed behavior
The data imports as a single string or nested record, failing to automatically distribute the internal nested structures into separate flat columns.
Before you start

Verify the structure of your text file to determine whether it is a properly formatted JSON document or a custom text format with inconsistent nesting, as this dictates the exact Power Query method required.

Solution 1Recommended

Import Properly Formatted JSON Data Using Power Query

Use this method if your file follows standard JSON syntax, allowing Power Query to automatically detect and parse the nested elements.

Power Query features a built-in JSON connector that accurately reads nested hierarchies like arrays (square brackets) and objects (curly braces) and provides tools to flatten them.

1
Access the JSON Connector

Open Excel, navigate to the Data tab, click on 'Get Data', select 'From File', and then choose 'From JSON'.

2
Import the File

Locate your text or JSON file in the file explorer and click 'Import' to launch the Power Query Editor.

3
Expand the Nested Lists or Records

In the Power Query Editor, look for columns containing the words 'List' or 'Record'. Click the two-way expansion arrow icon located in the column header.

4
Extract to New Rows

Select 'Expand to New Rows' from the dropdown menu. Repeat this process for any sub-levels of nesting until all required data fields are visible as flat columns.

5
Load the Data to Excel

Once your columns are correctly formatted, click 'Close & Load' in the Home tab to export the parsed data into your Excel spreadsheet.

Import Properly Formatted JSON Data Using Power Query
Data Validation: Always verify that you have expanded all necessary nesting levels before loading the data, as deeply nested elements remain hidden by default.
Free Microsoft Office alternative

Experience Seamless Data Management with WPS Office

While highly advanced Power Query parsing is specific to Microsoft Excel, WPS Office provides robust, lightweight, and highly compatible spreadsheet tools for everyday data formatting, CSV handling, and text-to-columns tasks without the premium price tag.

  1. 1. Download and Install: Visit the official WPS Office website to download the free installer for Windows, Mac, or Linux.
  2. 2. Open Your Spreadsheets: Launch WPS Spreadsheets and instantly open your existing Excel workbooks and data files.
  3. 3. Manage Data Easily: Utilize powerful built-in data handling tools like Text to Columns and Data Import wizards to quickly organize your flat data files.
100% compatible with Microsoft Excel (.xlsx) file formats.Free and intuitive interface for seamless migration from Microsoft Office.Built-in 'Text to Columns' tools to easily parse standard delimited data files.Lightweight installation with blazing fast performance on all devices.
microsoft office alternative - wps office

Frequently Asked Questions

How do I know if my nested text file is valid JSON?

Valid JSON uses standard key-value pairs separated by colons, with objects enclosed in curly braces {} and arrays in square brackets []. You can copy a snippet of your text file and paste it into a free online JSON validator to check its format.

Why is Power Query only showing the words 'List' or 'Record' instead of my actual data?

This happens when your imported text or JSON contains embedded tables or arrays at that level. To view the underlying data, click the two-way expansion arrow icon located at the right side of the column header to expand those records into new rows.

Can Power Query extract data from files with uneven nesting levels?

Yes. When expanding records or lists that do not share uniform nesting, Power Query handles missing fields gracefully by returning a null value in the generated column for the entries lacking data at that specific level.