返回列表 上一主題 發帖

[發問] ACCESS網頁上抓取資料

With .QueryTables.Add(Connection:="URL;http://bsr.twse.com.tw/bshtm/bshtm_report_
是屬於Excel下載查詢﹐Access不能用

TOP

在Access中可用Microsoft.XMLHTTP下載﹐如下列
   Dim MSXML As Object
   Set MSXML = CreateObject("Microsoft.XMLHTTP")
   strWebsite="http://bsr.twse.com.tw/bshtm/bshtm_report_Messages.aspx?strDate=20121203&StartNumber=1101"
   MSXML.Open "GET", strWebsite, False
   MSXML.SetRequestHeader "Content-type", "text/xml"
   MSXML.send

TOP

        靜思自在 : 發脾氣是短暫的發瘋。
返回列表 上一主題