-
Notifications
You must be signed in to change notification settings - Fork 624
Mac excell 2016 - parse json from url #73
Description
First off, bear with me, for I am new on parsing Json, let alone a code wizard (far from). Code ought to work on pref both win and mac, but I'm already happy with just mac.
I did import the dictionarry and the JsonConvertor.
I simply try to get the values from a simple URLhttps://maps.googleapis.com/maps/api/distancematrix/json?origins=amsterdam&destinations=paris&mode=walking&language=en
I gives me the following Json:
{ "destination_addresses" : [ "Paris, France" ], "origin_addresses" : [ "Amsterdam, Netherlands" ], "rows" : [ { "elements" : [ { "distance" : { "text" : "480 km", "value" : 479837 }, "duration" : { "text" : "4 days 3 hours", "value" : 355208 }, "status" : "OK" } ] } ], "status" : "OK" }
I need the "distance" "text" value as a variable so I can work with it. I've been at it for three days, browsing all over the place and getting desperate.
I tried an example here, where the code works for windows. I need it to work for mac. The example would be almost perfect, yet the `Set http = CreateObject("MSXML2.XMLHTTP")' gives me the runtime error:
429: ActiveX Component can't create object
Is there a way I can actually pull in the values on a mac 2016? I've read on various forums that the modules here would provide such support. So I'm guessing I'm not understanding it correctly. Any pointers on how to...?