【发布时间】:2020-07-14 11:19:06
【问题描述】:
我正在尝试将 Nasdaq 的历史数据直接导入 excel。我已经成功调用了网站,更改了“FromDate”输入并点击了搜索按钮,但我无法以良好的格式将“历史输出”表格刮到 Excel - 请帮助。
我的 VBA 代码
Sub OMX_data()
Dim URL As String
Dim ie As InternetExplorer
Set ie = New InternetExplorer
ie.Visible = True
ie.navigate ("http://www.nasdaqomxnordic.com/indexes/historical_prices?Instrument=DK0060368991")
Do
DoEvents
Loop Until ie.readyState = 4
ie.document.all("FromDate").Value = "2018-01-01"
Set search_button = ie.document.getElementsByClassName("doSearch")
search_button(0).Click
End Sub
我的 HTML
<div id="historicalOutput"><table id="historicalTable" class="tablesorter tablesorter-default" border="0" cellpadding="0" cellspacing="0" role="grid">
【问题讨论】:
-
当你没有时间反馈他们的解决方案是否适合你@JohnJohn时,为什么有人会为你提出解决方案?