Hi All,
I need to extract a table from webpage using URL and paste it in an excel sheet.
Here i have around list of 200 unique IDs, so everytime i need to go to webpage-copy table paste in an excel again use back button in webpage,go to next ID and copy table and paste.
I would like to know if is it possible to automate this process using macros.
I mean i just need to enter the ID and Macros automatically copy the table from webpage nad paste it. I tried a simple code which look like
Using this i am able to fetch exact data but i need to give ID everytime and my results are displayed in a1 (sheet1)
Is it possible to get all the result in same column and for next ID, the details are diaplayed below previous one.
Thanks in Advance.
I need to extract a table from webpage using URL and paste it in an excel sheet.
Here i have around list of 200 unique IDs, so everytime i need to go to webpage-copy table paste in an excel again use back button in webpage,go to next ID and copy table and paste.
I would like to know if is it possible to automate this process using macros.
I mean i just need to enter the ID and Macros automatically copy the table from webpage nad paste it. I tried a simple code which look like
Code:
Sub URL_Get_Query()
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;[URL]http://xyz?id=[[/URL]""QUOTE"",""Enter ID""]", _
Destination:=Range("a1"))
.BackgroundQuery = True
.TablesOnlyFromHTML = True
.Refresh BackgroundQuery:=False
.SaveData = True
End With
End Sub
Using this i am able to fetch exact data but i need to give ID everytime and my results are displayed in a1 (sheet1)
Is it possible to get all the result in same column and for next ID, the details are diaplayed below previous one.
Thanks in Advance.
Last edited by a moderator: