Import Data from Web

AndrewKent

Well-known Member
Joined
Jul 26, 2006
Messages
889
Hi there,

I am trying to import data into Excel from the "Statistics" tab on this link:

http://www.flashscores.co.uk/detail/soccer.php?match=588618&gmt_offset=-3600&tab=1

However I cannot seem to get it to work. All I can import is the data from the first tab. here is my code:

Code:
Sub Macro1()

    With ActiveSheet.QueryTables.Add(Connection:= _
        "URL;http://www.flashscores.co.uk/detail/soccer.php?match=588618&gmt_offset=-3600&tab=5" _
        , Destination:=Range("$B$3"))
        .Name = "soccer.php?match=588618&gmt_offset=-3600&tab=5"
        .FieldNames = True
        .RowNumbers = False
        .FillAdjacentFormulas = False
        .PreserveFormatting = True
        .RefreshOnFileOpen = False
        .BackgroundQuery = True
        .RefreshStyle = xlInsertDeleteCells
        .SavePassword = False
        .SaveData = True
        .AdjustColumnWidth = True
        .RefreshPeriod = 0
        .WebSelectionType = xlEntirePage
        .WebFormatting = xlWebFormattingNone
        .WebPreFormattedTextToColumns = True
        .WebConsecutiveDelimitersAsOne = True
        .WebSingleBlockTextImport = False
        .WebDisableDateRecognition = True
        .WebDisableRedirections = False
        .Refresh BackgroundQuery:=False
    End With
    
End Sub

Can anyone help me please?

Kind regards,

Andy
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Web query functionality in Excel is pretty basic and doesn't work well with complex webpages. You may want to try iMacro.
 
Upvote 0
Andrew
There is no tab called Statistics on the page that URL leads to.
 
Upvote 0
Wasn't there last night when I first tried the link and the code.:)

Which is perhaps one of the main problems with gettting data from a page/site like this.
 
Upvote 0

Forum statistics

Threads
1,224,587
Messages
6,179,733
Members
452,939
Latest member
WCrawford

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