- ©«¤l
- 361
- ¥DÃD
- 57
- ºëµØ
- 0
- ¿n¤À
- 426
- ÂI¦W
- 0
- §@·~¨t²Î
- win7
- ³nÅ骩¥»
- 2003,2010
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2010-5-13
- ³Ì«áµn¿ý
- 2022-12-8
|
¦^´_ 1# jasonwu0114 - Sub ºô»È()
- Dim URL As String, shts As Worksheet
- Dim x As Variant, xi As Integer, A As Object, xlHtm
- Set shts = ActiveSheet ' '("¤u§@ªí2")
- shts.Cells.Clear
- URL = "https://wwwfile.megabank.com.tw/rates/M001/viewF.asp"
- With CreateObject("InternetExplorer.Application")
- .Visible = True ' ¬O§_Åã¥Ü IE
- .Navigate URL
- Do While .ReadyState <> 4 Or .Busy
- DoEvents
- Loop
- Do While .ReadyState <> 4 Or .Busy: DoEvents: Loop
- xlHtm = .Document.body.innerHTML 'Àx¦s
- Set A = .Document.getElementsBytagname("table")
- For xi = 0 To 2
- .Document.body.innerHTML = A(xi).outerHTML
- .ExecWB 17, 2 ' Select All
- .ExecWB 12, 2 ' Copy selection
- With shts
- .Range("A" & .[A65535].End(xlUp).Row + 1).Select
- .PasteSpecial Format:="HTML", Link:=False, DisplayAsIcon:=False, NoHTMLFormatting:=True
- End With
- .Document.body.innerHTML = xlHtm 'ÁÙì
- Next xi
- shts.Cells.EntireColumn.AutoFit ' ¦Û°Ê½Õ¾ãÄæ¼e
- .Quit
- End With
- End Sub
½Æ»s¥N½X |
|