ranjithkumar10

Import JSON to excel

Dec 16th, 2016
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 0.45 KB | None | 0 0
  1. Public Sub customjson()
  2. mydata = "{'data':[{'id':1,'name':'Eredivisie','active':true},{'id':2,'name':'Jupiler League','active':true},{'id':4,'name':'Bundesliga','active':true}]}"
  3. Set JSON = ParseJson(mydata)
  4. i = 2
  5. For Each Item In JSON("data")
  6. Sheets(1).Cells(i, 1).Value = Item("id")
  7. Sheets(1).Cells(i, 2).Value = Item("name")
  8. Sheets(1).Cells(i, 3).Value = Item("active")
  9. i = i + 1
  10. Next
  11. MsgBox ("complete")
  12. End Sub
  13.  
  14. 'Credits - https://codingislove.com
Add Comment
Please, Sign In to add comment