- ©«¤l
- 5923
- ¥DÃD
- 13
- ºëµØ
- 1
- ¿n¤À
- 5986
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW°ò¶©
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2022-1-23
|
¦^´_ 9# spermbank
VBA ¨S¦³¦w¸Ë IE ªº»¡©ú- Option Explicit
- Sub °ò¥»¥«ªp³ø¾Éºô¯¸()
- Dim xlVbTable(1 To 2) As Object, R As Integer, C As Integer, i As Variant, Y As Integer
- Sheets("¤u§@ªí3").Select
- With CreateObject("InternetExplorer.Application")
- ' .Visible = True
- .Navigate "http://newmis.twse.com.tw/stock/fibest.jsp?stock=5490"
- Do While .Busy Or .ReadyState <> 4: DoEvents: Loop
- Application.Wait Now + TimeValue("00:00:02") 'IE¶}±Ò«á¦A¼È°±2¬íµ¥Ô¤U¸üIE¸ê®Æ
- Set xlVbTable(1) = .Document.getElementById("hor-minimalist-a")
- Set xlVbTable(2) = .Document.getElementById("hor-minimalist-b")
- On Error Resume Next
- With ActiveSheet
- .Cells.Clear
- Y = 1
- For i = 1 To 2
- For R = 0 To xlVbTable(i).Rows.Length - 1
- For C = 0 To xlVbTable(i).Rows(R).all.Length - 1
- .Cells(Y, C + 1) = xlVbTable(i).Rows(R).Cells(C).innertext
- Next
- Y = Y + 1
- Next
- Next
- End With
- .Quit
- End With
- End Sub
½Æ»s¥N½X |
|