Copy webdata into excel

carlleese24

Board Regular
Joined
Mar 15, 2005
Messages
108
hi


Could someone help me please

from this address
http://www.xscores.com/LiveScore.do...te=eventFS&sport=1&newState=promptSoccerTable

I am trying to create a macro so it will copy the table from the above website address above into excel. I have tried to import the data but it won't work. Is there another way using a VBA code to get that table into excel automatically.


I would really appreciate it if someone could help me on this problem

Carl
 
As kyrgan says, stepping through will help you to understand what is happening. I put a few comments which should also help.

Basically, the code opens the website, then looks to find the tables in the webpage. First table is the header (0), 2nd table is just below that (1) and the 3rd table is the league table.
(easier to see in the web query section - the parts you can tick are tables)

Then we look at each row in the table and split the individual cells from the table into cells in the spreadsheet.
 
Upvote 0

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.

Forum statistics

Threads
1,215,759
Messages
6,126,728
Members
449,332
Latest member
nokoloina

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top