How can i pull data from web into excel cell?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pushpu
    New Member
    • Dec 2013
    • 1

    How can i pull data from web into excel cell?

    I have a public json URL that outputs a digit.
    How can i have a certain excel spreadsheet cell pull the data from that URL and use that data?
  • Luuk
    Recognized Expert Top Contributor
    • Mar 2012
    • 1043

    #2
    The URL, http://ip.jsontest.com returns the ip-address as a string in json-format.

    Formula: =GetData("http://ip.jsontest.com ")
    with the following macro:
    Code:
    Function GetData(URL As String) As String
        Set OXH = CreateObject("msxml2.xmlhttp")
        With OXH
            .Open "get", URL, False
            .send
            x = .responseText
        End With
        Set OXH = Nothing
        GetData = x
    End Function
    for more json testurls, see: http://www.jsontest.com/#ip
    Last edited by Luuk; Dec 12 '13, 12:32 PM. Reason: added url for this test-age

    Comment

    • gutts009
      New Member
      • Dec 2013
      • 10

      #3
      Hi, it very simple make you excel input TEXT only.
      and use Opera to copy text from there it will not fetch link from website. and when you will past you will get the same thing.
      Last edited by Rabbit; Dec 19 '13, 04:42 PM. Reason: You're link spamming, please stop. Second Warning.

      Comment

      Working...