Importing json to excel

Table of contents

      • What is JSON?
      • What are the applications of JSON files?
      • What is Excel?
      • Applications of Excel
      • How to Import JSON file in EXCEL?
      • What is a JSON format?
      • How to view JSON files?
      • Free Excel Courses
      • Conclusion
      • FAQs
  • What is JSON?
  • What are the applications of JSON files?
  • What is Excel?
  • Applications of Excel
  • How to Import JSON file in EXCEL?
  • What is a JSON format?
  • How to view JSON files?
  • FAQs

What is JSON?

JSON is an abbreviation used for JavaScript Object Notation which is a file format. JSON is used to store and exchange data over the network. The data from the server to the client can be shared through a JSON file. 

The JSON file is easy to share and analyze. The file extension of a JSON document is “.json”. It is a standard file format based on text and is mainly used for the transmission of data on websites and web applications. JSON syntax is just like the JavaScript Object syntax. It can be read and understood easily. It is most widely used among web applications because it is very lightweight to work with. The JSON files can be loaded easily and a non-technical person can also understand them quickly. 

The format that a JSON document is written as of key-value pair. JSON combined with Excel provides greater usability to import data. If you have a JSON file and you want to import it into Excel for better data analysis. Then it is possible to import the JSON file using Power Query. This article will look at this operation to import JSON to Excel. We’ll also see how you can use that imported data in Excel very efficiently. 

What are the applications of JSON files?

Here are some useful applications of JSON documents below:

  • JSON documents are mainly used to write programming code in programs that are specifically based on JavaScript, like Angular, Node, React, etc. 
  • JSON can adopt all programming languages, which is the main reason for its popularity. 
  • JSON files are useful when transferring data from the server to the client.
  • JSON is a lightweight document, and that’s the reason it is mostly used for web communications. 
  • The JSON documents are shared on the network in a structured way. 
  • Various applications allow importing data from JSON format through APIs, making the data import very easy. 
  • The JSON format is very useful for serialization and transmission of data over the network. 

What is Excel?

Excel is a software program developed by Microsoft. Excel is a very useful software to store data and is mainly used for the application of mathematical formulas on that data and calculation purposes. As data is very important for organizations, and that’s the reason Excel has become very productive for businesses. Excel is most widely used by businesses to analyze their data effectively. 

The extension of Excel is “.xlsx”. Excel also provides the creation of charts, graphs, and various visualizations that helps to understand the data. You can also customize the UI of Excel based on your preferences. 

You can even share an Excel file with collaborators to enable the updation of data from multiple users. This way, the Sales Managers take input from their team in a single Excel file. Excel also allows you to automate various data manipulation tasks through its inbuilt Visual Basic Application. You can use Visual Basic and write code to automate several tasks in Excel. This feature increases the productivity of using Excel. 

Excel also gives you a bunch of options to import your data through the Web or other file formats. You can also import your data from a JSON file. In this article, we’ll see how you can import JSON documents in Excel for better analysis of data. Also, while you’re at it, check out this excel course online free to learn more about excel.

Applications of Excel

  • Easy to Utilize Interface: The interface of MS Excel is easy to use, and anybody can understand the interface and usability of MS Excel quickly. 
  • Graphical Representation: It becomes very difficult to understand data in raw format. To solve this problem, Excel provides a graphical representation feature that you can use to visualize your data in a graphical format. This way, data can be analyzed very efficiently. 
  • Highly Supportive in Breaking Down Deals: Organizations use Microsoft Excel for their business needs. It helps businesses to examine the data of their sales and customers, which results in productive decision-making. 
  • Financial Modeling: The financial analysis of organizations is simplified by MS Excel, and the maintenance of financial records is made easy. It is very important to calculate the datasets in financial modeling, and Excel provides inbuilt formulas that are very useful for financial modeling. 
  • Accessibility of a Broad Scope of Functions: The functions in excel are very beneficial for evaluating equations and computation of mathematical formulas. The functions in excel can easily be modified according to the needs, and it also allows for the creation of new functions for the user. 
  • Future Development of Any Business: MS Excel is very important software that helps businesses to make future decisions. It helps in business analysis which helps organizations to find insights into the data. 

How to Import JSON file in EXCEL?

There are various versions of MS Excel in the market that comes under MS Office like Office 2007,  2010, 2013 and so on. So, we’ll look at all these versions on how to open JSON files in Excel. Unfortunately, Office 2007 doesn’t give an option to import JSON files. But the later version of Excel allows it.

How you can import JSON files in Office 2010 version? 

  • Open a New Excel Workbook and look for the Power Query tab. 
  • In the Power Query tab, go to Other sources and then click blank query. 
  • Now, go to the JSON file on your computer and copy the path of the file. 
  • In MS Excel, it will give you a blank space for your query, there you need to paste the path copied from the JSON file. 
  • Click OK and it will load the JSON file in Excel Power Query. Now you can manipulate the data of the JSON file. 

The version of MS Office introduced after Office 2010 was 2013. There were some changes in this version and let’s see how you can import your JSON files in Excel 2013.

  • Open a New Excel Workbook and find the Power Query tab. 
  • Go to Other sources and then choose blank query.
  • Go to Advanced editor in the Query Editor.
  • Enter the query as the path of your JSON file.

Now, the latest version of Excel comes under Office 2019. The below steps define how to open a JSON file in Excel. 

  • Go to the Data tab in an Excel Workbook.
  • Click on From File and then choose JSON.
  • Now, choose the JSON file from your system and select OPEN.
  • This will open the JSON file in Excel and now you can view the data. 

Opening JSON From the Internet in Excel

The latest version of Excel also supports importing the data from the web. You can also import the JSON file from the Internet or by using an API call. To import the JSON from the internet, you need to follow these steps:

  • Go to the Data tab in an Excel workbook.
  • Select From Web option under the “Get & Transform Data” ribbon.
  • After that an input box will appear in your window where you will have to enter the URL for the JSON file. 
  • Click OK and it will open the JSON file in Power Query first.
  • Then you need to transform the data into a table and also apply other transformations to your data. 
  • After that when you Close & Apply from the Power Query, it will open the transformed data in Excel. 

What is a JSON format?

JSON stands for JavaScript Object Notation which means the data in this file represents every information as an object. And the data stored in the JSON file is lightweight. The JSON format is used by JSON files as “.json”. It is very useful while communicating between the server and the client. The text format in the JSON file is completely language-independent. However, anyone can easily understand a JSON file because of its simplicity. The other programming languages such as Python, C, C++, and others can also use JSON files for various purposes. 

The JavaScript scripting language represents the data in a JSON file as a simple data structure by using associative arrays. These are called objects. By using these objects, the data can be differentiated easily. 

So the format JSON is used by the JSON files to organize the data. 

How to view JSON files?

As we know JSON is a document that contains data. So the JSON file is generally a text file just like other text files of Notepad or Notepad ++. The JSON file can be viewed in Notepad, Wordpad, or any other text editor. You can also view the JSON files in Python. To understand the data in a JSON file, it is best viewed in MS Excel. You can view the JSON document in an Excel workbook by importing the file available either on your system or on the internet. 

Free Excel Courses

  • Excel Tips and Tricks
  • Excel for Intermediate Level
  • VLOOKUP in Excel

Conclusion

JSON documents are very useful for transmitting the data from the server to the client. And Excel is used to store the data in a spreadsheet. Excel allow us to apply formulas and functions to that data. JSON document is best viewed in Excel in a table format and Excel presents the data in a clean format. So, it is very useful to import a JSON file in Excel. 

As we know, there are various versions of Excel available, but older versions of Excel don’t allow importing a JSON file. But, now you have the option to import any JSON document whether it is available locally on your machine or you can also import a JSON from the internet. 

In this article, we talked about how productivity increases when working with JSON and Excel together. You can use the steps described above to import a JSON file in MS Excel. Learn more Excel tricks with us today!

FAQs

How do I import a JSON file into Excel?

To import the JSON file to the latest version of Excel, you need to follow the below steps:
1. Open a new Excel workbook and go to the Data tab.
2. Select the option Get Data if you have the JSON file on your system and locate the path in the input field to get the JSON file. 
3. If you want to import a JSON file available on the internet, then you need to choose From Web option in the Data tab. 
4. After that you need to give the URL of the file and click OK. 
5. It will load the JSON file in Microsoft Power Query where you can transform the JSON file before it gets opened in MS Excel. 
6. After the transformation of your data in the JSON file, you need to close Power Query and it will load the data in the Excel workbook. 

How do I import JSON to Excel 2016?

To import the JSON file in MS Excel 2016 version, follow the steps given below:
1. Open a New Excel workbook and go to the Data tab.
2. Choose the Get Data option and Choose From JSON.
3. After that specify the path to the JSON file and click OK.
4. It will fetch the file and take you to the Power Query Editor. 
5. Now, you need to transform your JSON file to a table format. 
6. And then you need to click on Close and Apply which will open the table in Excel. 

How do I edit a JSON file in Excel?

To edit a JSON file in Excel, you need to import the file in Excel first. You can follow the steps discussed in this article to open a JSON file in Excel that will take you to Power Query Editor first. In the power query editor, you can edit the JSON file before importing it to Excel. 

How do I convert JSON to CSV?

When you import the JSON file in Excel, it will open the Power Query editor and then you need to transform the JSON file to a table format. After all the transformations are done, you need to close the Power Query that will open the JSON table in MS Excel. Then you can save the table in CSV format from excel. This way, you can convert a JSON document into CSV. 

How do I import data into Excel?

To import the data in Excel, go to the Data tab. There you will find various options to import the data such as From text/CSV, From Web, and Get Data. You can choose any of the options relevant to you and import the data in Excel. 

Can Excel read JSON?

Yes, you can import the JSON data in MS Excel. But first, you need to convert the data into a table format which will be done in Power Query when you import the data. This way Excel reads the data from the JSON document. 

How do I convert a JSON file to readable?

The steps below show how you can convert a JSON file to readable:
1. There is a tool named JSON to String that you can use to convert the JSON file. 
2. After opening the tool, you need to copy and paste the JSON Code to the text editor. 
3. You can also upload the JSON file to the tool that will convert it into readable. 
4. After that click on JSON to String button and then you will see the conversion is started. 
5. After successful conversion of JSON to readable, you can save and share the string data. 

Can Excel pull data from an API?

Yes, you can use API to import data to excel. You need to go to the Data tab in Excel and choose the Get Data option. There you will see From other Sources option. Then you need to choose From Web from that list. 
You will be asked for a URL where you can enter the API URL for the data you need to pull in Excel. This will import the data from the API call to Excel. 

How do I convert API data to Excel?

To access the API Data in Excel, follow the steps below:
1. Open MS Excel and go to the Data tab.
2. There you will see a bunch of options to get data, you need to choose From other sources drop-down list.
3. In the list, you will see an option From OData Data Feed. You will need to use this option.
4. After that you will be asked for a link URL or the path for the file. 
5. You can enter the URL of the results of the API service. 
6. Then if the API is public, you don’t need to enter the User Name and Password. But in the case of the private API call, you will have to enter the User Name and Password to connect to the API.
7. After successful connection to the API, you will be asked to fetch the data that you need in Excel.
8. Click Next and it will save the data connection and finish the dialogue box. 
9. Lastly you need to choose if you want to view the data in the existing worksheet or the new worksheet. There are other options too and you can choose any of them based on your needs. And it will download the data from the API to your excel. 
This way you can convert the API data to Excel. 

JSON, short for JavaScript Object Notation, is an open standard file format (text-based) that is used for storing and transporting data. It is commonly used for transmitting data from a server to a web page (e.g., transmitting data from the server to the client, so it can be viewed on a web page, or vice versa).

JSON is a data transfer format that comes as a plain text file (like XML). If you have some important data stored in a JSON file that you would like to import into an Excel spreadsheet, you can easily do that with Excel’s ‘Get & Transform’ feature and you don’t even need any VBA code to import data from the local disk or from a web API. Let’s see how to convert/import a JSON file to an Excel file.

How to Import JSON File into Excel

JSON is represented in a logical, easy-to-read universal data structure. It is made up of only two data types – objects or arrays, or a combination of both. Objects are key-value pairs with a colon between them and arrays are simply collections of objects separated by a comma.

You can easily convert JSON files to Excel files (.xlsx) using Excel’s ‘Get & Transform’ tool (Power Query). Initially, it was were called ‘Data Explorer’, then it was renamed to ‘Power Query’. Power Query is only available in 2010 and 2013 versions of Excel. In Microsoft Excel 2016, 2019, and 365, it was again renamed to the ‘Get & Transform’ feature on the Data tab.

This is how a JSON file will look like:

Now, we have a sample JSON file named Employees as shown above. Let’s see how we can convert this JSON file to an Excel file.

JSON Data

JSON data is written as name/value pairs. A name(key)/value pair consists of a field name (in double quotes), followed by a colon, followed by a value:

"First Name": "Dulce"

JSON Objects

JSON objects can contain multiple name/value pairs (just like in JavaScript) and they are written inside curly braces as shown below.

{
"First Name": "Dulce",
"Last Name": "Abril",
"Gender": "Female",
"Country": "United States",
"Age": "32",
"Date": "15/10/2017",
"Id": "1562" 
}

JSON Arrays

JSON arrays are written inside square brackets ( [ ] ) and it is a collection of objects.

Importing JSON File into Excel

In the example above, the JSON array contains numerous objects. And each object is a record of an employee (with First Name, Last Name, Gender, Country, Age, Date, and Id). In this tutorial, we will use ‘Excel 2016’ to demonstrate the data import.

First, open the Microsoft Excel and switch to the ‘Data’ tab and click the ‘Get Data’ button in the ‘Get and Transform Data’ group at the leftmost corner of the ribbon. From the drop-down expand the ‘From File’ and select the ‘From JSON’ option.

When you click the ‘From JSON’, you will get a file browser window. Find the JSON file on your local disk and click ‘Import’.

If you want to import data from a web API (Web Application Programming Interface), you may want to import the data directly from the internet. To do this, instead of clicking the ‘From JSON’ option, go to Data tab > Get Data > From Other Source > ‘From Web’ and enter the web URL.

When you click ‘Import’ button as shown in the above screenshot, it will bring you into the Excel Power Query Editor. You will notice all the records that were in that list broken into rows. But we can’t see the actual data. To convert this list to a table, click the ‘To Table’ option.

A To Table dialog box will appear. In the dialog, keep the defaults and select ‘OK’.

Now your data is in a table format, but you still can’t see the record details. To expand the columns, click the ‘Expand Column’ button (icon with two arrows pointing away from one another).

You will see the columns that are listed in the records. Select the columns that you like to include in the table and click ‘OK’. Uncheck the columns that you’d like to be excluded.

The data will then be broken out into separate columns as shown below.

You can also move the columns around as you see fit. To do this, right-click on a column header, select ‘Move’, and choose where want to move it.

Once you are satisfied with the layout, click the ‘Close and Load’ button under the ‘Home’ tab to load data into Excel as a Table.

The data will now be imported into a new worksheet in Excel.


Convert JSON File into Excel File Online

If you want quickly convert JSON files to Excel files (.xslx), use one of the many third-party websites available online. They can convert your files in a matter of seconds, but they are not always reliable. Simply type ‘convert JSON to Excel’ in a search engine and you’ll get plenty of websites you can use.

One of the websites you can use to convert JSON to XSLX is json-csv.com. Open the website and click the ‘Upload JSON file’ button to upload the JSON from your local disk. Find the JSON file on your disk and click ‘Open’.

Once you upload the file, you’ll get a preview of your table below. Then, click the ‘Excel File (XLSX)’ button to download your converted Excel file.

That’s it! That’s how you import a .json File in Excel.

JSON (Javascript Object Notation) is the most used data exchange format nowadays. Microsoft Excel doesn’t have built-in support for importing JSON to excel or exporting excel data to JSON.

VBA-JSON is an excellent library for parsing JSON in VBA. Lets see how to handle JSON in Excel VBA. If you’re new to JSON then read JSON tutorial for beginners

Prerequisites

  1. Save your excel file as Macro-Enabled workbook (Refer screen shot below)
  2. Enable macros if they are not already enabled. You can enable it by cliking on file > options > Trust Center > Trust Center Settings > Enable all macros

Save as xlsm
Enable excel macros

Getting Started

  1. Download VBA JSON latest version from here
  2. Extract it, open VBA code editor in excel (Alt + F11) and import the library as shown in the gif below.
  3. Add a reference to Microsoft scripting runtime. (Tools > references > select)
  4. Add a reference to MSXML (Tools > references)
    Select appropriate version based on your PC :
    1. Microsoft XML, v 3.0.
    2. Microsoft XML, v 4.0 (if you have installed MSXML 4.0 separately).
    3. Microsoft XML, v 5.0 (if you have installed Office 2003 – 2007 which provides MSXML 5.0 for Microsoft Office Applications).
    4. Microsoft XML, v 6.0 for latest versions of MS Office.

excel to json
Add reference microsoft xml and scripting runtime excel

Import JSON to Excel

This library provides a simple method ParseJson to parse JSON string into a dictionary object which can be used to extract data. Let’s see an example.

I’m using fake data from http://jsonplaceholder.typicode.com/ which is an API service with fake Json data.

We’ll be pulling user data from http://jsonplaceholder.typicode.com/users by making a GET request which responds with Json data.

json sample data - json to excel

Read more about GET requests in VBA here

Next, we’ll parse that Json and import it to excel. Code for importing data looks like this :

Public Sub exceljson()
Dim http As Object, JSON As Object, i As Integer
Set http = CreateObject("MSXML2.XMLHTTP")
http.Open "GET", "http://jsonplaceholder.typicode.com/users", False
http.Send
Set JSON = ParseJson(http.responseText)
i = 2
For Each Item In JSON
Sheets(1).Cells(i, 1).Value = Item("id")
Sheets(1).Cells(i, 2).Value = Item("name")
Sheets(1).Cells(i, 3).Value = Item("username")
Sheets(1).Cells(i, 4).Value = Item("email")
Sheets(1).Cells(i, 5).Value = Item("address")("city")
Sheets(1).Cells(i, 6).Value = Item("phone")
Sheets(1).Cells(i, 7).Value = Item("website")
Sheets(1).Cells(i, 8).Value = Item("company")("name")
i = i + 1
Next
MsgBox ("complete")
End Sub

Code explanation

  1. First, define JSON as an object and make a GET request to JSON API
  2. JSON data received in the response is parsed by passing it into ParseJson method.
  3. parsed data is converted into a collection of dictionaries.
  4. Loop through the collection to get each user’s details and set its values to the first sheet.

Running above code looks like gif below.

import json demo - json to excel

Reading JSON from a file

In the same example above, If you want to read JSON data from a local file then you can use FileSystemObject to read all text in the file and then pass it to ParseJson method.

Dim FSO As New FileSystemObject
Dim JsonTS As TextStream
Set JsonTS = FSO.OpenTextFile("example.json", ForReading)
JsonText = JsonTS.ReadAll
JsonTS.Close
Set JSON = ParseJson(JsonText)

Export Excel to Json

VBA-JSON provides another method ConvertToJson which can be used to convert excel data into JSON. Here’s an example.

Sample data with Name, Phone and Email is present in second sheet. Let’s convert it into JSON

Code for this looks like :

Public Sub exceltojson()
Dim rng As Range, items As New Collection, myitem As New Dictionary, i As Integer, cell As Variant
set rng = Range("A2:A3")
'Set rng = Range(Sheets(2).Range("A2"), Sheets(2).Range("A2").End(xlDown)) use this for dynamic range
i = 0
For Each cell In rng
Debug.Print (cell.Value)
myitem("name") = cell.Value
myitem("email") = cell.Offset(0, 1).Value
myitem("phone") = cell.Offset(0, 2).Value
items.Add myitem
Set myitem = Nothing
i = i + 1
Next
Sheets(2).Range("A4").Value = ConvertToJson(items, Whitespace:=2)
End Sub

Code Explanation

  1. First, define rng as range and set it to data range.
  2. ConvertToJson method takes a dictionary collection or array as parameter. So we should pass our data as a collection.
  3. A Dictionary is an object with keys and values just like JSON but doesn’t support multiple items like arrays or collections, so we create a dictionary for each item and push it into an array or a collection.
  4. Define a dictionary and a collection, loop through the range and set each row’s data into myitem
  5. Push myitem into collection and set it to nothing, because we are using the same dictionary to add next row’s data and push it to collection again.

Finally pass items collection to ConvertToJson method which returns a JSON string.

Running above code looks like gif below

export excel to json

Export Excel to JSON file

In the same example above, If you want to export excel data to JSON file then It can be done by opening a file for output by specifying the path of the file and printing data in it. Sample code below, Running this would save a JSON file in the current workbook’s folder.

Public Sub exceltojsonfile()
Dim rng As Range, items As New Collection, myitem As New Dictionary, i As Integer, cell As Variant, myfile As String
Set rng = Range("A2:A3")
'Set rng = Range(Sheets(2).Range("A2"), Sheets(2).Range("A2").End(xlDown)) use this for dynamic range
i = 0
For Each cell In rng
Debug.Print (cell.Value)
myitem("name") = cell.Value
myitem("email") = cell.Offset(0, 1).Value
myitem("phone") = cell.Offset(0, 2).Value
items.Add myitem
Set myitem = Nothing
i = i + 1
Next
myfile = Application.ActiveWorkbook.Path & "data.json"
Open myfile For Output As #1
Print #1, ConvertToJson(items, Whitespace:=2)
Close #1
End Sub

Export Excel to Nested JSON

Above code can be modified a bit to get a nested JSON as output. Just add dictionary in another dictionary so that it creates a nested JSON. code looks like this :

Public Sub exceltonestedjson()
Dim rng As Range, items As New Collection, myitem As New Dictionary, subitem As New Dictionary, i As Integer, cell As Variant
Set rng = Range("A2:A3")
'Set rng = Range(Sheets(2).Range("A2"), Sheets(2).Range("A2").End(xlDown)) use this for dynamic range
i = 0
For Each cell In rng
Debug.Print (cell.Value)
myitem("name") = cell.Value
myitem("email") = cell.Offset(0, 1).Value
myitem("phone") = cell.Offset(0, 2).Value
subitem("country") = cell.Offset(0, 3).Value
myitem.Add "location", subitem
items.Add myitem
Set myitem = Nothing
Set subitem = Nothing
i = i + 1
Next
Sheets(2).Range("A4").Value = ConvertToJson(items, Whitespace:=2)
End Sub

Running above code looks like image below

export excel to nested json

Using array of strings and objects in JSON

One of our readers asked me how to use an array of strings and objects inside the JSON.

Here’s how to do it:

Public Sub exceltojson()
Dim rng As Range, items As New Collection, myitem As New Dictionary, i As Integer, cell As Variant, objectContainer As New Dictionary, arrayContainer As New Collection
Dim j As Integer
'Set rng = Range("A2:A3")
Set rng = Range(Sheets(1).Range("A2"), Sheets(1).Range("A2").End(xlDown)) 'use this for dynamic range
i = 0
For Each cell In rng
myitem("id") = cell.Value
myitem("name") = cell.Offset(0, 1).Value

'tags
tagsString = cell.Offset(0, 2).Value
tagsCollection = getCollectionFromString(tagsString)
myitem.Add "tags", tagsCollection

'ingredients
ingredientsString = cell.Offset(0, 3).Value
weightsString = cell.Offset(0, 4).Value
ingredientsUnit = cell.Offset(0, 5).Value
ingredientsCollection = getCollectionFromString(ingredientsString)
weightsCollection = getCollectionFromString(weightsString)

j = 0
For Each ingredient In ingredientsCollection
objectContainer("ingredientnaam") = ingredient
objectContainer("eenheid") = ingredientsUnit
objectContainer("hoeveelheid") = weightsCollection(j)
arrayContainer.Add objectContainer
Set objectContainer = Nothing
j = j + 1
Next
myitem.Add "ingredienten", arrayContainer

'Reset values
Set arrayContainer = Nothing
j = 0

items.Add myitem
Set myitem = Nothing
i = i + 1
Next
Sheets(1).Range("A6").Value = ConvertToJson(items, Whitespace:=2)
End Sub

Function getCollectionFromString(val)
getCollectionFromString = Split(val, ", ")
End Function

Running above code looks like image below
export excel to nested json

Wrapping up

Read official documentation of VBA-JSON here and use VBA-Dictionary for Mac Support.

Related articles :

  • Complete JSON tutorial here – JSON for beginners
  • Handling CSV in VBA

If you have any questions or feedback, comment below and please use CodingisLove Bin for sharing your code.

  • Author
  • Recent Posts

A CA- by education, self taught coder by passion, loves to explore new technologies and believes in learn by doing.

Skip to content

If you have data stored in JSON format that you would like to import into Excel, it’s now very easy and doesn’t require any VBA to import data locally from the disk or from a web API. Watch the video or read the steps below!

Step 1: Open The Data in the Query Editor

When clicking “From JSON”, you will be presented with a file browser. Find the file on your disk and click Import. This should bring you into the query editor. If you are using a web API, you may choose instead to import the data directly from the web. To do this, instead of clicking “From JSON”, click “From Web” and enter the URL. This should fetch the file and bring you into the query editor.

Step 2: Craft the Query

Start by finding the list in the data. Click through any single records until you find a list. Click it to open the list of records.

Click through the record to see what’s inside
Once you find the list, go ahead and click it to open it.

One you have found the list you are looking for, the list needs to be converted to a table for Excel to use. Click “To Table” to convert it.

Click “To Table” to convert the list to a table.

Once you have the list as a table, you need to specify which columns you want excel to make use of as well as have the opportunity to specify how any inner lists (array fields) may be dealt with. Click the icon with two arrows pointing away from one another to expand the table. You may want to rename the table before doing this. To do so, double click the name and type a new one.

Click the arrow icon to expand the table. Select the columns you want Excel to make use of and then click OK.

Step 3: Bring the Table Back Into Excel

Click Close and Load to bring the data back into Excel as a Table. A new sheet may be created.

Click Close & Load. The query editor will close and the data will appear as a table in Excel.

Enjoy the finished product!

Finished Product

What is JSON?

JSON (JavaScript Object Notation) is a file format that is used for storing and exchanging data in the network. It is used to send data from server to client and client to server.  JSON is easy for machines to analyze and generate. The extension of JSON  is .json. 

JSON records are, in reality, straightforward to peruse on the off chance that you know the construction of a Javascript document. You can utilize a proofreader with explicit help for JSON to get the disentangling. For instance, if there is an extremely pleasant JavaScript addon for Notepad++ called JSTool, which incorporates a JSON watcher, it shows the decoded esteem strings so you can duplicate the string to another content record. 

Check Out upGrad’s Java Bootcamp

A commonplace JSON record is a word reference where every section has a string key, and each worth is a string, a number, or exacting like valid, bogus or invalid. The qualities are strings that are encoded by the shows of Javascript, which is practically equivalent to Java or C, implying that every typical character is composed with no guarantees and all extraordinary characters are encoded with an oblique punctuation line.

This is either followed by the scorch that is implied or by a hex number that addresses the ASCII or Unicode estimation of the singe. For example, on the off chance, you have French or Spanish scorches or dialects that are totally outside Latin letters in order like Russian or Chinese. 

JSON is JavaScript object documentation or a progression of JavaScript objects with recorded credits. These credits are what is recorded within each set of wavy sections and give data about the object. JSON records may contain numerous objects in each document. They might be the consequence of an information dump from a program that utilizes JSON documentation or methods by which a client can enter data into a data set. MongoDB, for instance, locally utilizes JSON to store information. 

A JSON document is a record that stores straightforward information constructions and objects in JavaScript Object Notation (JSON) design, which is a standard information trade design. It is principally utilized for sending information between a web application and a server. JSON documents are lightweight, text-based, comprehensible, and can be altered by using a content manager. 

Also, check out our free courses to get an edge over the competition.

Open the record in Notepad, save it as a .TXT document, and then import it into Excel.

The Structure of JSON is 

Filename = [{key: value}]

Example

JSONExample ={ “namelist” : [ {name:”mark”, age:18, location:” Mars”},

{name:Steve Rogers, age:118, location:”Moon”},

{name:”Tony”, age:48, location:”DC”},

{name:”Peter Parker”, age:18, location:”Queens”},

{name:”Thor”, age:18, location:”Ascord”} ],

“id”:1

}

Applications of JSON

  • JSON files are primarily used while writing programming code in Javascript-based programs like node, react, etc.
  • The JSON file is used for transmitting data in a structured way while transferring via a network.
  • Most of the time JSON is used to transfer data between server and client applications.
  • In the modern era, JSON overtakes XML in the maximum amount.
  • It can adapt to all programming languages.

upGrad’s Exclusive Software and Tech Webinar for you –

Check Out upGrad’s Advanced Certification in Cyber Security

SAAS Business – What is So Different?

What is Excel?

Excel is the name of a software program created by Microsoft and is known as Microsoft Excel. It uses a spreadsheet to store the data and numbers with the functions and formulas. The extension of the excel file is .xlsx. It is widely used in the business sector.

There are important things about excel that you can learn at upGrad. Excel is perhaps the most remarkable measurement software. It permits you to store the information in even arrangement, i.e., in lines and segment design. It additionally allows you to collaborate with your data differently. 

You can sort and channel the information utilizing probably the most powerful equations. The turntables one is the best component of Excel. You can use turntables to make another understanding by controlling the information. Excel has different highlights that can assist you with insights. There are different approaches to bringing in and sending out the information. You can likewise incorporate the data into the work process. 

Like no different insight software, Excel permits you to make the custom capacity utilizing its programming capacities. The basic role of Excel is to make records of information and to control the information according to the users’ requests. As referenced before, Excel permits you to utilize the outside information base to dissect and make reports, among other things. 

Currently, Excel offers the best graphical UI alongside the utilization of design instruments and representation strategies.

Source 

Applications of Excel

1. Easy to Utilize Interface

MS Excel has an easy-to-use interface that empowers the client to utilize the software effectively without battling an excessive amount to keep up any records. 

2. Graphical Representation

MS Excel empowers the client to graphically address the information entered. This component of excel helps break down the numbers easily when we manage an enormous amount of data. When handling a vast amount of data (extending to 1000 lines), graphical representation helps us assess the information quickly. 

3. Highly Supportive in Breaking Down Deals

Excel helps organizations break down deals and buys and appropriately assists them with examining their purchasing/selling choices. 

Our learners also read: Excel online course free!

4. Financial Modeling 

Quite possibly, the main benefit of Excel is that it simplifies the financial analysis of the organization. It helps with maintaining the financial records of the organization in an easily accessible format. Excel is often used to calculate or determine EBITDA, WACC, net sales, and net profits, among other things.

5. Accessibility of a Broad Scope of Functions

Excel has enormous scope for doing equations which assists us with computing the entirety, item, difference, and any arrangements of numbers. The user can call upon various functions to simplify the vast data at hand to offer an accurate deduction.

6. Future Development of Any Business 

Excel is a valuable instrument to break down different sorts of information. Organizations use Excel to get an accurate picture of their business development and get a realistic forecast of the coming years’ achievable growth. Excel helps organizations accomplishing a particular development rate by examining the progress of the business.

How to Open JSON file in EXCEL?

The methods of opening JSON files in Excel vary in different versions of Microsoft Excel. You can apply the following methods to open a JSON file depending on the versions of Excel you have:

Office 2007

In the 2007 version of Office, excel doesn’t have the option to open a JSON file in EXCEL.

Office 2010

  • After opening Excel, on the Power Query tab, click From Other Sources > Blank Query.
  • In the Query Editor, click Advanced Editor.
  • Input your query string as follows, replacing “C:UsersNameDesktopexample.json” with the path to your JSON file.

let

    Source = Json.Document(File.Contents(“C:UsersNameDesktopexample.json”)),

    #”Converted to Table” = Record.ToTable(Source)

in

    # “Converted to Table”

Office 2013

In the 2013 version of Office, excel doesn’t have the option to open a JSON file in EXCEL.

  • After opening Excel, on the Power Query tab, click From Other Sources > Blank Query.
  • In the Query Editor, click Advanced Editor.
  • Enter your query string as follows, replacing “C:Usersexample.json” with the path to your JSON file.

let

    Source = Json.Document(File.Contents(“C:Usersexample.json”)),

    #”Converted to Table” = Record.ToTable(Source)

in

    # “Converted to Table”

In Newer Version of Excel

  • Select Data > Get Data > From File > From JSON. The Import Data dialog box appears.
  • Search the JSON file, and then select Open.

Opening JSON From the Internet in Excel

The above methods are used for opening files stored in local storage. If you want to import JSON data from the internet or from an API call, you can do the following:

  • Go to Data Tab -> Transform data -> Click From Web. It will open a window or modal.

Source

  • Then, open the power query.

Source

  • Next, create a table for the JSON.

Source

  • By following the steps, you can open the JSON file in EXCEL.

Learn Software Courses online from the World’s top Universities. Earn Executive PG Programs, Advanced Certificate Programs, or Masters Programs to fast-track your career.

Conclusion

JSON (JavaScript Object Notation) is a file format that is used in storing data and exchanging data in the network. EXCEL uses a spreadsheet to store the data and numbers with functions and formulas. The steps for opening a JSON file in Excel differ in several versions of EXCEL. In the newer version, you can open a JSON file by selecting “Data” > Get Data > From File > From JSON. The Import Data dialogue box appears. Search the JSON file, and then select “Open.” You can check out Free online Excel courses offered by upGrad on Excel

If you’re interested to learn more about full-stack development, check out upGrad & IIIT-B’s Executive PG Program in Full-stack Software Development which is designed for working professionals and offers 500+ hours of rigorous training, 9+ projects and assignments, IIIT-B Alumni status, practical hands-on capstone projects & job assistance with top firms.

What is a json format?

JSON is a format of storing and exchanging data. It stands for JavaScript Object Notation. JSON is a lightweight data-interchange format. It is used primarily to transmit data between a server and web application, as an alternative to XML. It is a text format that is completely language independent but uses conventions that are familiar to programmers of the C-family of languages, including C, C++, C#, Java, JavaScript, Perl, Python, and many others. This data interchange format is simple, small, and language independent JSON was derived from the JavaScript scripting language for representing simple data structures and associative arrays, called objects. It has become quite popular for transporting data between the server and web application. It is considered as a lightweight or language independent alternative to XML and is used in numerous AJAX applications.

How to view json files?

JSON file is actually a text file, you can view it line by line with simple text editor like notepad, notepad++ or emacs and so on. If you want to view it in python, it’ll be better to install jq, in that case, you can view it in python like: jq ‘.result’. There are many available JSON libraries for almost every language. If you are interested in Java, you may want to check out GSON. If you want to use for Python, you can also use simplejson.

What are the applications of JSON files?

JSON files are files that store data in JavaScript Object Notation. This is a lightweight format for storing data which is easy for humans to read and write. One of the best features of JSON files is that they are readable by both machines and humans (unlike XML) and more importantly, they work well with JavaScript. JSON files are commonly used for data-driven web applications. In fact, you can even use them to make a web page dynamic. JavaScript has the ability to parse these files and that’s why JSON is one of the best ways to return data to a web page. You can store data in a well-organized and easily-readable format.

Want to share this article?

Land on Your Dream Job

Like this post? Please share to your friends:
  • Importing from xml to excel
  • Importing from excel to mysql
  • Importing from csv to excel
  • Importing from access to excel
  • Importing file names to excel