vba 碼 如下:
URLb = "https://www.taifex.com.tw/cht/3/futContractsDateExcel"
Set ie = CreateObject("internetexplorer.application")
On Error Resume Next
ie.Visible = False ' 是否顯示 IE
ie.Navigate URLb
Do While ie.readyState <> 4 Or ie.Busy: DoEvents: Loop
Application.Wait Now + TimeValue("00:00:03") '等待頁面,過快會找不到資料
Dim DArray(20) As Variant '陣列暫存
DArray(1) = Trim(ie.document.getelementsbytagname("td")(27).innertext)
' office2003 可以 2019 不行