Excel VBA Using A Web Service with XMLHTTP - Weather Forecast

Sdílet
Vložit
  • čas přidán 10. 02. 2012
  • This tutorial shows how to use Excel VBA to get information from a web service using XMLHTTP. Code can be found here: brettdotnet.posterous.com/exce... Since posterous closed: brettdotnet.wordpress.com/
  • Jak na to + styl

Komentáře • 31

  • @DontFretBrett
    @DontFretBrett  Před 11 lety +3

    Hey vagabond. I learned just through trial and error, googling stuff. One small step at a time. Been programming with VB for over 15 years. I'm sure there are some VBA books out there. I have contemplated doing a full VBA series to take one from absolute excel beginner to full on VBA professional

  • @razandy
    @razandy Před 12 lety

    Its OK Brett. Thanks for your reply but i have sorted it and now my eBay Excel system is working like a dream all thanks to your Vids, Thanks Again :-)

  • @ubaleamit
    @ubaleamit Před 10 lety

    Hi brett, how i can download temperature from accuweather without using any XMLHTTP. if you have any idea pls help...

  • @mariellamarrero7773
    @mariellamarrero7773 Před 9 lety

    Brett,
    How do we add reporting for multiple cities? What do we have to type in after "next weather" and before "End Sub"? I know we need the URL for the next city, and I will re-name the field descriptions to have the information flow correctly, just not sure how to get the button command to also bring in the information for the new city. Any thoughts?

  • @vagabond197979
    @vagabond197979 Před 12 lety

    Brett, thank you for these cool vids. I just started recently getting into using excel to collect information from the internet. Can you tell me where you learned how to do this? Is there a book that would help me? I have found a bunch of examples on the internet but I would just like a bit more formal explanation. Btw, I'm interested not only in using XML but also the InternetExplorer object (and other) with early and late binding. Thanks.

  • @deepaksinha8010
    @deepaksinha8010 Před 11 lety

    Hi razandy may i see this application vba webservice which you made based on weather forecasting m talking about shipdate salesrecord in vba

  • @razandy
    @razandy Před 12 lety

    Hi Brett. I came up with some code based on your tutorial thank u. How can I make the below XML work which includes Parent and Child Nodes within one record? How would I switch the getElementsByTagName from SaleRecord then to SalesStatus to extract ShipDate. I can not extract the ShipDate when getElementsByTagName SaleRecord is selected.
    (SaleRecord)(Title)Widget(/Title)(QTY)10(/QTY)(SaleStatus)(ShipDate)2012-01-16(/ShipDate)(/SalesStatus)(/SaleRecord) Thanks in Advance

  • @mpredolim
    @mpredolim Před 7 lety

    Excellent! Thanks a lot.

  • @alikalkandelen8344
    @alikalkandelen8344 Před 5 lety

    Hey Fret, How different would the code be if you received a JSON object instead of an xml? Do you have any videos you can link that would show that difference?

  • @razandy
    @razandy Před 11 lety

    Hi Brett
    Is there any chance you could show an example (if you are able to) show how one would get this working on a web page using HTML? You now if I wanted it to work in a specific area of my webpage.
    Thanks in advance

  • @deepaksinha8010
    @deepaksinha8010 Před 11 lety

    Hi Bret I want to know how to fetch flight schedule in xml format using webservice in vba would you pls put on you youtube it might be much helpfull for beginner

  • @Myrslokstok
    @Myrslokstok Před 6 lety

    I am loading down an excel file from an web page where you log in and you take out the file as a report. Sometimes it works and some times it doesnt, I get a 404 error or a 200 and it works. It is a bit more code, but I do not get why it works half of the times.

  • @deepaksinha8010
    @deepaksinha8010 Před 11 lety

    Hi razandy why dont you put on switch the getElementsByTagName from SaleRecord then to SalesStatus to extract ShipDate application on youtube in vba bz I am vba learner too

  • @jaymurallon
    @jaymurallon Před 9 lety

    Hi brett,
    We have the same code but I'm stuck with Run-time Error '91' - Object variable or With block variable not set, at this specific line:
    wShape.Fill.UserPicture Weather.SelectNodes("weatherIconUrl").Item(0).Text
    Please help, thank you.

  • @ricardolopes9960
    @ricardolopes9960 Před 9 lety

    Excellent Tutorial!
    How should I enter a username and password?
    The website I am trying to reach, requires this information.
    Thanks for supporting a lot of people.

  • @neeravpatel85
    @neeravpatel85 Před 5 lety

    Awesome..
    Thanks..

  • @deepaksinha8010
    @deepaksinha8010 Před 11 lety +1

    Hi razandy can you send me your workbook which has given vba webservice code for SaleRecord)(Title)Widget(/Tit­le)(QTY)10(/QTY)(SaleStatus)(S­hipDate)2012-01-16(/ShipDate)(­/SalesStatus)(/SaleRecord) let me know how did u write the code

  • @janezklun
    @janezklun Před 7 lety

    The beste tutorial!!! Is it possible to get some new ones, thank you

  • @jaedonbigbrain8700
    @jaedonbigbrain8700 Před 3 lety

    I did something similar but it doesn't work there's a mistake that I don't find out could you help me please ? Just watching my code

  • @nickfraser1084
    @nickfraser1084 Před 9 lety +1

    So I've been stuck on this for quite a while, always at the first responseText bit
    .
    Each time I run this i get a run-time error stating "Method 'open' of object 'IXMLHTTPRequest' failed
    Any help?

    • @MachielMastenbroek
      @MachielMastenbroek Před 9 lety

      Nick Fraser It means that the URL is not working any more, I updated the VBA code including a new URL. See my post on: brettdotnet.wordpress.com/2012/02/11/excel-vba-using-a-web-service-with-xmlhttp-we/comment-page-1/

  • @andreiturcan9692
    @andreiturcan9692 Před rokem

    Hi, this is a great video. Can you advise how to extract date+time from next:

  • @teehheee
    @teehheee Před 11 lety

    DO IT!!!

  • @deepaksinha8010
    @deepaksinha8010 Před 11 lety

    Hi bret uhave wondefull video but try to put some advance video in vba like automating reportng in vba

  • @pietermlouw
    @pietermlouw Před 7 lety

    How would I code this to take readings every hour and actually store the data?

    • @DontFretBrett
      @DontFretBrett  Před 7 lety +1

      Pieter Louw you could do a loop and save to a database or something but there's not an easy way to do asynchronous operations in excel. I've seen it done using directx.. people have made games in excel using it. So you could do a loop with an hour pause but your excel UI will be frozen / non interactive

    • @pietermlouw
      @pietermlouw Před 7 lety

      How would you go about doing this? Would you rather create a Chrome extension and import to an excel sheet?

  • @zjk0122
    @zjk0122 Před 12 lety

    that's awesome. if i ONLY need today's weather information, such as Feb. 16, 2012, how can i change the code below:
    For Each Weather In Resp.getElementsByTagName("weather")
    i = i + 1
    Range("Date").Cells(1, i).Value = Weather.SelectNodes("date")(0).Text
    Next Weather
    'cause the codes above will get the final day weather information, say Feb. 17, 2012
    Thanks for your time~

  • @deepaksinha8010
    @deepaksinha8010 Před 11 lety

    bret pls

  • @discountordealboykh1612
    @discountordealboykh1612 Před 12 lety

    All Comments