Posts by pandaaram

    Re: Fetching data from multiple URL


    Kyle,


    I was hoping that getting information as per unformatted tab might be simpler when compared to formatted one. Also, I wasn't sure if Formatting was doable because of following reasons:


    1. Address - will be more than one line. So, merging them all and adding it to a single cell might be difficult.
    2. Categories - Likewise. Sometimes, we can have one category, but many a time, we end up with more than 5-6 of them.


    Even if we couldn't add it to a single cell, its OK if we could identify the Max number of rows (Across columns A-H) occupied by previous query and start from the next one.


    Hope this helps and forgive me as i don't possess coding skills on VB. I do know programming, so i can understand the logic happening in the program, however not upto the mark in getting to code.

    Re: Fetching data from multiple URL


    Kyle - Agree.. If we could get info as per "Unformatted" page it would make sense as well as I can use some Sort/ filer options to re-arrange it in way specified in the "formatted" page.

    Re: Fetching data from multiple URL


    Kyle,


    No - I don't get the error now. but by the look of response on the worksheet URL it doesn't seem to be alright as the data seems to be overwriting the contents.



    The correct data should be as per the attachment (either one is fine)


    NOTE: I am getting the same error while executing Macro GetData". If i execute macro test, it gives "Application defined or object defined error"

    Re: Fetching data from multiple URL


    Kyle,


    I tried copying this code as a macro, retained row B2 to B10 on Sheet2 and executed the macro.. getting "Run time error -2147024891 (80004005) Access is denied" error message.


    I ain't trying to access anything that is password protected. Could you kindly let me know where i am going wrong? Attaching screenprint for reference.


    Also, should the detail

    Code
    With .getelementsbytagname("table")(5)


    be replaced with


    Code
    With .getelementsbytagname("table")(6)

    Re: Fetching data from multiple URL


    Kyle,


    Attached excel contains the list of URL's from which i would the data to be extracted. I am sorry for jumping onto the other thread. I posted bcz i felt both queries were relevant. Apologies if its against the forum rules.


    Output - Requires formatting. I think i will be able to do once sheet 2 has information about Webtable 6 from all URLs..

    Re: Extract data from Web/pull data from web through excel


    Kyle,


    I have similar query and hope you may help.


    I have an Excel that contains the following:


    Sheet1 - Col B with name & Col C with URL


    Requirement: Extract webtable 6 for each of these URL's and save it on Sheet-2. Also, the # of rows per URL may vary. Hence, it should find the last populated value in Col B and start from next row.


    Sample Macro recorded:


    Dear Friends,


    I have recorded a Macro and its something like this:



    This Macro would fetch details from URL mentioned and paste the data in "A1" on Sheet-1.


    Requirement: I have over 3000 such URLs from which data needs to be downloaded. the URL links are present in a separate worksheet. How do i reference "Connection:=_" to dynamically get it from the work sheet and increment it by 1?


    Also, how do i set the Destination:=Range to dynamically refer to last row + 1 rather than hardcoding it as $A$1 or $A$20, etc?


    Any help in this regard is highly appreciated.