How can I retrieve JSON from an HTTP endpoint, from within Excel on MacOS, and parse it? -
i have seen how can send http post request server excel using vba?
and the macos-friendly response describes how retrieve info http endpoint using querytables. demonstrates how retrieve single string , stuff cell.
all good. retrieve more single value. it's big json string, , want post-process within excel vba before populating 1 or more cells.
how possible?
i can think of 1 way - place result of querytables thing hidden cell, , post-process hidden cell populate other cells. there few json libraries vba have not evaluated yet.
but seems pretty hacky. want not rely on storing json value in cell. i'd store variable in vba code. if using createobject("msxml2.serverxmlhttp"). (nb: createobject() not available within excel on macos).
and understand best reply here might be: get windows machine if want run apps within excel.
you can acutally utilize worksheets(0).querytable
method in vba. have @ manual or google it. don't have store json string cell.
or have used
public function getwebsource(byref url string) string dim xml ixmlhttprequest on error resume next set xml = createobject("microsoft.xmlhttp") xml .open "get", url, false .send getwebsource = .responsetext end set xml = nil end function
to download json string.
look around parsers. somehting parsing json in excel vba should fill needs.
json excel vba excel-vba-mac
No comments:
Post a Comment