|
- Sub t()
- Dim html As Object, http As Object, i, n, j
- n = 2
- Set html = CreateObject("htmlfile")
- Set http = CreateObject("Msxml2.XMLHTTP")
- http.Open "GET", "http://www.77tj.org/tencent", False
- http.send
- html.body.innerhtml = http.responseText
- Set tb = html.body.getelementsbytagname("tr")
- For i = 1 To tb.Length - 1
- n = n + 1
- For j = 0 To tb(i).ChildNodes.Length - 1
- Cells(n, j + 1) = tb(i).ChildNodes(j).innertext
- Next
- Next
- End Sub
复制代码
|
|