+ Reply to Thread
Results 1 to 6 of 6

Web Query through URL in Cell

  1. #1
    Registered User
    Join Date
    05-18-2009
    Location
    Toronto, Ontario
    MS-Off Ver
    Excel 2003
    Posts
    14

    Web Query through URL in Cell

    As the title says,

    I've got a cell (using various applications of CONCATENATE) which will always contain the correct URL for my web query.

    So the page would notice by itself that the cell has been changed, and would attempt to do a web query using that url in the cell - whilst submitting the results on the third (empty) worksheet on the first row of the page or so.

    Is that even possible? - And if so, how?

    The link I'll be using for the Web Query is : http://www.nationstates.net/cgi-bin/...gi/nation=XXXX - (try http://www.nationstates.net/cgi-bin/.../nation=unibot for some examples of its feed).

    The box that the current url will always be in is called "Targeturl"

    I've attached the workbook, however the server wasn't working earlier for this. So if anyone wants to see the workbook - I'd be more than willing to email it to them. I don't think its very relevant though, considering it doesn't yet have the code on it.

    Thank You

    ______________________________________

    If this is in the wrong subforum - Sorry. I was unsure on which one was the current one - I was assuming that VB would be needed to solve this problem (if it can be done).
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    05-18-2009
    Location
    Toronto, Ontario
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Web Query through URL in Cell

    Bump! ------------------------------

  3. #3
    Registered User
    Join Date
    05-30-2009
    Location
    France
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Web Query through URL in Cell

    Actually I have a similar problem that I posted here yesterday. I just checked for you : my code works well for an XML formatted page like yours. Unfortunatly my own problem is still unresolved : doing the same thing for a web page that just returns plain text without html or xml formatting.

    So the below code should give you a good start. Just put it it in a VBA function and pass the URL from the cell as an argument and use it in the Connection string.

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    05-18-2009
    Location
    Toronto, Ontario
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Web Query through URL in Cell

    Well thanks so far,

    Just put it it in a VBA function and pass the URL from the cell as an argument and use it in the Connection string.
    But I'm a little thick :D, can you explain what you mean there.

  5. #5
    Registered User
    Join Date
    05-30-2009
    Location
    France
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Web Query through URL in Cell

    Well, I did not think that my english was that bad
    So I suppose you do not know how to define a function in VBA. That's quite basic, Google is your friend. One random link for you :
    http://www.fontstuff.com/VBA/vbatut01.htm
    Try to understand and then fiddle around a bit with the above code. Come back if you have any specific question.

    Sorry if I appear rude, that is not my intention. I understand this forum as a place for people who know a at least a little bit about Excel Programming and are willing to learn more (this is at least my case). But I am not willing (and it looks like nobody else is either) to write your program for you. Although this might be quite fast to do in your case it is useless because you would not learn you anything new.

  6. #6
    Registered User
    Join Date
    05-18-2009
    Location
    Toronto, Ontario
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Web Query through URL in Cell

    Hey fredoman, thanks for the reply. I can live with that.

    Have you seen this tutorial > http://guj800.wordpress.com/2008/06/...ing-excel-vba/

    I'm not sure, but from the code, it looks like it's dealing with XML feed from HTML coded websites.

    I'm still trecking along with this coding business (err... all I needed was this Query to work, and I was done! Err...)

    I've got, Function NS(Connection As String), so far.

    Wow, I'm good.....

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1