我目前正在运行以下Web查询,以便从我使用的Google工作表中返回3000多行数据。不幸的是,当我运行它时,它只返回100行数据。无论如何还要扩展其功能以提取完整的3000行数据吗?
Sub Basic_Web_Query()
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;https://docs.google.com/spreadsheets/d/.....",
Destination:=Range("$A$1"))
.Name = "q?s=goog_2"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlSpecifiedTables
.WebFormatting = xlWebFormattingNone
.WebTables = "1,2"
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
End Sub
谢谢!
答案 0 :(得分:0)
我发现这个伟大的代码在线将谷歌表导出到.csv文件然后我可以用另一个代码调用它。
http://excel-elearning.blogspot.in/2017/11/excel-vba-how-to-download-google-sheet.html