Import json data into Excel

Solution 1:

You can do this in VBA with the vba-json library. Here's an example of some code I copied:

Sub TestJsonDecode() 'This works, uses vba-json library 
    Dim lib As New JSONLib 'Instantiate JSON class object 
    Dim jsonParsedObj As Object 'Not needed 

    jsonString = "{'key1':'val1','key2':'val2'}" 
    Set jsonParsedObj = lib.parse(CStr(jsonString)) 

    For Each keyName In jsonParsedObj.keys 
        MsgBox "Keyname=" & keyName & "//Value=" & jsonParsedObj(keyName) 
    Next 

    Set jsonParsedObj = Nothing 
    Set lib = Nothing 
End Sub 

Sub TestJsonEncode() 'This works, uses vba-json library 
    Dim lib As New JSONLib 'Instantiate JSON class object 
    Set arr = CreateObject("Scripting.Dictionary") 

    arr("key1") = "val1" 
    arr("key2") = "val2" 

    MsgBox lib.toString(arr) 
End Sub 

Solution 2:

Here are some example excel downloads with json excel connversion capabilities. You can do it straight from within excel.

http://ramblings.mcpher.com/Home/excelquirks/json

Solution 3:

  1. Paste the JSON into json-csv.com.

  2. Download the resultant CSV file.

  3. Open the CSV file up in Excel.