- ©«¤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 ©ó 2014-6-23 09:43 ½s¿è
¦^´_ 11# ¤p«L«È - 'ºô¶·j´Mµ²ªG: 0 °O¿ý
- Option Explicit
- Sub IE¤U¤@¶()
- Dim url As String, a As Object, Table As Object, i As Integer, pubSrch As Object, Pages As Integer
- Dim Sh As Worksheet, B As String, E
- Set Sh = ActiveSheet
- Sh.Cells.Clear
- '************************************
- url = "https://eservices.customs.gov.hk/MSOS/wsrh/001s1?"
- 'url = "https://eservices.customs.gov.hk/MSOS/wsrh/001s1?"searchBy=A" 'ºô¶¦³¸ê®Æ
- '************************************
- With CreateObject("InternetExplorer.Application")
- .Visible = True ' ¬O§_Åã¥Ü IE
- .Navigate url
- Do While .ReadyState <> 4 Or .Busy
- DoEvents
- Loop
- Do
- Set a = .Document.getElementsByTAGName("TD")
- Loop Until Not a Is Nothing 'And a.Length = 84
- On Error Resume Next
- With Sh
- For i = 0 To a.Length - 1
- .Cells(i + 1, "A") = i
- .Cells(i + 1, "B") = a(i).Type
- .Cells(i + 1, "C") = a(i).ID
- .Cells(i + 1, "D") = a(i).InnerText
- .Cells(i + 1, "E") = a(i).Value
- Next
-
- End With
-
- .Quit
- End With
- MsgBox "getElementsByTAGName(""TD"") ¦Xp " & a.Length
- End Sub
½Æ»s¥N½X
|
|