我有一些VBA代码已经运行了几年。代码是:
With ActiveSheet.QueryTables.Add(Connection:="URL;" & myURL, Destination:=Range("$A$1"))
.Name = "Weather"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlOverwriteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlEntirePage
.WebFormatting = xlWebFormattingNone
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
用于返回逗号分隔文件的代码,我可以解析该文件以获取所需的数据。但是,在过去几天,代码返回一个完全格式化的网站。似乎“& format = 1”(需要返回逗号分隔文件)未被网站识别。
当我直接在Chrome或IE中输入网址时,我会收到以逗号分隔的文件。我的查询表没有运气(不再)谁能给我一些指导?