ranjithkumar10

Custom json to excel

Oct 4th, 2016
2,006
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 0.50 KB | None | 0 0
  1. Public Sub customjsontoexcel()
  2. myjson = "{'error': false,'details': [{'name': 'AKSHAY','age': 25,'id': 'AV123','place': 'BANGALORE'}]}"
  3. Set JSON = ParseJson(myjson)
  4. Debug.Print JSON("error") 'prints false
  5. Debug.Print JSON("details")(1)("name") 'prints Akshay
  6. Debug.Print JSON("details")(1)("age")
  7. Debug.Print JSON("details")(1)("id")
  8. Debug.Print JSON("details")(1)("place")
  9. End Sub
  10. 'add a loop to JSON("details") if there are multiple objects in that array.
  11. 'credits - https://codingislove.com/excel-json/
Add Comment
Please, Sign In to add comment