api - Foursquare data into Excel -


im attempting results of foursquare api venue search excel simple table. im using request here , saving results file .json ending. ive tried using several online converters change csv/xml read excel. however, have managed 1 website produce results, , unfortunately charge. there way results of query excel table more easily?

here's 1 approach take extract individual elements response. mean need create "accessor" functions in script control each property though.

sub testit()      dim json string, x long, num long      json = createobject("scripting.filesystemobject"). _            opentextfile("c:\_stuff\test\json.txt").readall()      'debug.print json      dim s object, jsobj object     set s = createobject("scriptcontrol")     s.language = "jscript"      s.executestatement "var obj = null;" & vbcrlf & _          "function json(s){obj=eval('('+s+')');}" & vbcrlf & _          "function numvenues(){return obj.response.venues.length;}" & vbcrlf & _          "function venueid(i){return obj.response.venues[i].id;}"      s.run "json", json      num = s.run("numvenues") 'how many venues     debug.print num     x = 0 num - 1         debug.print s.run("venueid", x)     next x   end sub 

Comments

Popular posts from this blog

c++ - CryptStringToBinary API behavior -

c++ - Correct method for redrawing a layered window -

java.util.scanner - How to read and add only numbers to array from a text file -