- ©«¤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
        
|
¥»©«³Ì«á¥Ñ GBKEE ©ó 2013-9-4 12:37 ½s¿è
¦^´_ 5# t8899
¦h½m²ß¤@¤UVBA´N·|¶i¨B(¤£·|¨Ã¤£¤@©wn°Ý¤Hªº)- Option Explicit
- Sub Ex()
- Dim xlVbTable As Object, Ar, R As Integer, C As Integer, i As Variant, Y As Integer
- Dim t As Date
- t = Time
- With CreateObject("InternetExplorer.Application")
- ' .Visible = True
- .Navigate "http://udn.megatime.com.tw/asp/hot/ShortOperate.asp?lcount=20&m=puplim&align=v"
- Do While .Busy Or .ReadyState <> 4: DoEvents: Loop
- Set xlVbTable = .document.getelementsbytagname("table")
- On Error Resume Next
- With ActiveSheet
- .Cells = ""
- .Cells(1, 1) = "º¦°±ÂꦺªÑ"
- For Each i In Array(20, 24)
- If i = 24 Then .Cells(1, "J") = "¶^°±ÂꦺªÑ"
- Y = 2
- For R = 0 To xlVbTable(i).Rows.Length - 1
- For C = 0 To xlVbTable(i).Rows(1).ALL.Length - 1
- .Cells(Y, C + IIf(i = 20, 1, 10)) = xlVbTable(i).Rows(R).Cells(C).innerText
- 'IIf(i = 20, 1, 10) -> 1:="A", 10:="J"
- Next
- Y = Y + 1
- Next
- If i = 20 Then .Rows(13).Delete
- Next
- End With
- .Quit
- End With
- MsgBox Application.Text(Time - t, "¶O®É [ss] ¬í")
- End Sub
½Æ»s¥N½X |
|