Here you go
Sub GetData()
Dim x As Long, y As Long
Dim htm As HTMLDocument
Set htm = CreateObject("htmlFile")
With CreateObject("msxml2.xmlhttp")
.Open "GET", "http://fantasy.premierleague.com/stats/elements/?element_filter=te_4&stat_filter=total_points", False
.send
htm.body.innerhtml = .responsetext
End With
With htm.getElementsByTagName("table")(0)
For x = 0 To .Rows.Length - 1
For y = 0 To .Rows(x).Cells.Length - 1
Sheets(2).Cells(x + 1, y + 1).Value = .Rows(x).Cells(y).innertext
Next y
Next x
End With
End Sub
Bookmarks