How to Expand Multiple JSON Lists in Excel Power Query
Question details
The user needs to expand multiple nested lists from a JSON file in Power Query to display multilingual content, such as book chapters and sentences, side by side.

- Product
- Excel Power Query
- Device & OS
- not provided
- Scenario
- Importing a complex JSON file containing nested lists of multilingual text to compare original and translated sentences side by side.
- Observed behavior
- Power Query does not provide a single automated command to expand all nested lists simultaneously; they must be expanded step-by-step or transformed via custom M code.
Ensure your JSON file is properly formatted and accessible. It is highly recommended to understand the basic schema of your JSON data—such as whether lists contain nested records, tables, or plain values—before importing it into Power Query.
Expand JSON Lists Step-by-Step Using the Power Query Editor
Manually expand each nested list using the Power Query interface, which is ideal for visually managing data transformations without writing code.
Because JSON structures vary, Power Query cannot safely guess how to flatten multiple nested arrays at once. Expanding them step-by-step allows you to choose whether to expand to new rows or extract specific values.
Open Excel, go to the 'Data' tab, select 'Get Data', then 'From File', and click 'From JSON'. Locate and import your JSON file.
Once the data loads into the Power Query Editor, click 'To Table' in the Transform tab to convert the initial Record or List into a workable table format.
Click the two-arrow 'Expand' icon in the column header. If it is a list, choose 'Expand to New Rows'. If it is a record, select the specific columns you want to extract.
Continue clicking the Expand icon for each subsequent nested column until all necessary data levels (such as language, chapter, and sentence) are fully visible.
To display multilingual sentences side by side, select your 'Language' column, go to the Transform tab, and click 'Pivot Column'. Choose your translated sentences column as the Values column.

Use Power Query M Code for Complex JSON Structures
Utilize the Advanced Editor to write custom M code, offering maximum control when dealing with deeply nested or dynamically changing JSON schemas.
Looking for a Lightweight Alternative for Your Spreadsheets?
While advanced Power Query M-code transformations are native to Microsoft Excel, WPS Office provides a robust, lightweight, and completely free alternative for everyday data analysis and spreadsheet management. With full compatibility for Microsoft formats, you can easily open, edit, and share your exported JSON-to-table data files without missing a beat.
- 1. Download and Install: Get WPS Office for free from the official website and install it on your device.
- 2. Open Your Data: Launch WPS Spreadsheet and easily open your exported .xlsx or .csv files.
- 3. Analyze and Share: Use built-in tools like Pivot Tables to analyze your multilingual data and share it seamlessly.

Frequently Asked Questions
Why can't I expand all JSON lists at once in Power Query?
Power Query does not provide a universal command to expand all nested lists automatically because JSON structures vary wildly. Each list might contain different data types (records, tables, or primitive values), requiring specific instructions to ensure accurate data extraction without creating millions of blank or duplicated rows.
How do I display multilingual JSON data side by side in Excel?
After expanding your JSON nested lists into rows containing your chapter, sentence number, language identifier, and text, you can use the 'Pivot Column' feature in Power Query. Select the language column to pivot and set the text column as your values. This action transforms the rows into columns, aligning the translations side by side.
What should I do if my JSON file is too large for Power Query?
For extremely large JSON files, Excel might run out of memory during expansion. Consider pre-processing the file using a scripting language like Python to flatten the data beforehand, or split the JSON into smaller chunks. In Power Query, ensure you are removing unnecessary columns before expanding lists to conserve system resources.




