【发布时间】:2017-05-20 09:10:24
【问题描述】:
2017 年 5 月 16 日,yahoo.finance 更改网址以下载 Eod 价格。我尝试使用新的 Url,但它不起作用。
With ActiveSheet.QueryTables.Add(Connection:= _
"TEXT;https://query1.finance.yahoo.com/v7/finance/download/APPL?period1=946854000&period2=1495234800&interval=1d&events=history&crumb=" + mycrumb _
, Destination:=Range("Dati!$A$2"))
.Name = "Data Table"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.TextFilePromptOnRefresh = False
.TextFilePlatform = 850
.TextFileStartRow = 1
.TextFileParseType = xlDelimited
.TextFileTextQualifier = xlTextQualifierDoubleQuote
.TextFileConsecutiveDelimiter = False
.TextFileTabDelimiter = True
.TextFileSemicolonDelimiter = False
.TextFileCommaDelimiter = True
.TextFileSpaceDelimiter = False
.TextFileColumnDataTypes = Array(5, 1, 1, 1, 1, 1, 9)
.TextFileTrailingMinusNumbers = True
.Refresh BackgroundQuery:=False
有人可以帮我解决我的问题吗?有人有同样的问题吗? 非常感谢
安德烈亚
【问题讨论】:
-
"...但它不起作用。"什么不工作?该站点无法访问,您收到 VBA 错误,数据加载但数据不正确,等等......?
-
我建议现在使用 Alpha Vantage 股票数据 API。它真的很好用。我刚刚写了一篇关于它的博客文章:the-data-wrangler.com/…
标签: vba excel yahoo-finance