如何导入季后赛数据

时间:2019-04-16 20:01:14

标签: excel vba

我正在尝试从此页面导入季后赛数据 https://www.basketball-reference.com/players/t/thompkl01/gamelog/2019/

我尝试复制用于获取季节数据的同一宏,但将.webtables的数量从8更改为9不会返回任何数据。

With ActiveSheet.QueryTables.Add(Connection:= _
    "URL;https://www.basketball-reference.com/players/ _ 
     t/thompkl01/gamelog/2019/", _
     Destination:=Range("$C$11"))
    .Name = "2019"
    .FieldNames = True
    .RowNumbers = False
    .FillAdjacentFormulas = True
    .PreserveFormatting = True
    .RefreshOnFileOpen = False
    .BackgroundQuery = True
    .RefreshStyle = xlInsertEntireRows
    .SavePassword = False
    .SaveData = True
    .AdjustColumnWidth = True
    .RefreshPeriod = 0
    .WebSelectionType = xlSpecifiedTables
    .WebFormatting = xlWebFormattingNone
    .WebTables = "8"
    .WebPreFormattedTextToColumns = True
    .WebConsecutiveDelimitersAsOne = True
    .WebSingleBlockTextImport = False
    .WebDisableDateRecognition = False
    .WebDisableRedirections = False
    .Refresh BackgroundQuery:=False
End With

获取季后赛数据的最佳解决方案是什么?

1 个答案:

答案 0 :(得分:0)

您可以使用抓取工具来实现自己的目标,例如dataminergrepsr等。

最良好的祝愿