How to Import a .json File in Excel

Here’s how you can import a .json File in Excel in just 8 steps and be able to analyze your data easily.

Introduction

Recently I took some advice from the guys over at Income School about blog writing. They suggested looking at your own browser history for topics. Being the nerd that I am, I wanted to pick over my entire history in excel if possible.


Once I figured out how to export my chrome history, I found it was in a .json format. The file extension .json stands for JavaScript Object Notation


Step 1: Install Power Query in Excel


Go to the Microsoft website at this link 

( https://www.microsoft.com/en-us/download/details.aspx?id=39379&CorrelationId=e95a7ce6-4a2a-4913-8df3-94f68de57e61)
and download power Query for your version of excel.

Open .json file in Excel
Choose either the 32 or 64-bit version of Power Query


Step 2: Install Power Query


Follow the prompts to install the software.

Open .json file in Excel Installation


Step 3: Open Power Query


Open Excel, and at the end of the ribbon, click Power Query. This. will open a new window.

At the end of the ribbon, click “Power Query”

Step 4: Open the .json File


Now click from other sources and choose Blank Query. Next, click advanced, editor. A new window will open.

Open .json file in Excel - Select Blank Query
Choose “Blank Query”


Step 5: Enter Code


Click Home on the ribbon and choose Advanced Editor

Choose “Advanced Editor”

When the window opens copy and paste this:

let

Source = Json.Document(File.Contents(“C:\Users\Name\Desktop\JSONTest.json”)), #”Converted to Table” = Record.ToTable(Source)

in

#”Converted to Table”


into the advanced editor. Put your path in the area with the quotes. Be sure to have the quotes in place. One easy way to get the path is to go to the file’s location in file explorer and right-click the path and choose copy as text. Now, you can paste it and then add a backslash and the file name.

This is what the above code should look like. Make sure to use your file’s path.


Step 6: Expand the Data


This is where our paths may differ. I was searching through my chrome history for blog topics. If this is what you’re doing, you should be good to go!
Click here and choose “Expand to new Rows”

Open .json file in Excel - Expand to New Rows
Click the box next to “Value”, then “Expand to New Rows”


Step 7: Choose Your Data


Choose your expanded data by checking the boxes and click OK.

Open .json file in Excel - Select Data
Pick the Data you want


Step 8: Close and Load

On the left choose close and Load

Open .json file in Excel - Close and Load
Choose “Close and Load”

Conclusion


That’s it! that how to import a .json File in Excel. Not to bad huh? What kind of data are you converting? Leave a comment and sign up below.


Check out our latest posts for other tutorials and reviews!

Leave a Comment

Follow Us:

Latest from Automation-Wizard.com

Recent Posts

You May Be Interested In:

Sign up for the latest news and posts!

This Site may use affiliate links from time to time at no additional cost to you. This helps to support the quality content on this site. Thanks for understanding!