我正在尝试实现一个可以从网站导入多个表的代码。我可以使用以下代码来做到这一点。但是,代码太慢了。
Sub FetchData()
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;%url%", Destination:=Range( _
"$A$1"))
.Name = "xyz"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlAllTables
.WebFormatting = xlWebFormattingNone
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
End Sub
有人可以建议一个可以快速输出的代码吗?