|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
lalasnoopy 发表于 2012-7-3 17:38 ![](static/image/common/back.gif)
这个page有什么用处呢?.... 问题很弱 但是对网页真的是一点都不懂... 这个是java script? 要补习什么内 ...
Sub test()
On Error Resume Next
Set r = CreateObject("Microsoft.XMLHTTP")
r.Open "get", "http://www.hsi.com.hk/HSI-Net/HSI-Net?cmd=downloads", False
r.Send
Set x = r.responseXML.getElementsByTagName("entry")
For i = 0 To x.Length - 1
Cells(i + 1, 1) = x(i).getAttributeNode("id").NodeValue
Cells(i + 1, 2) = x(i).getAttributeNode("date").NodeValue
Cells(i + 1, 3) = x(i).getAttributeNode("timestamp").NodeValue
Cells(i + 1, 4) = "http://www.hsi.com.hk/HSI-Net/static/revamp/contents" & x(i).ChildNodes(0).getAttributeNode("href").NodeValue
Cells(i + 1, 5) = x(i).ChildNodes(0).Text
Cells(i + 1, 6) = x(i).ChildNodes(1).getAttributeNode("index").NodeValue
Cells(i + 1, 7) = x(i).ChildNodes(1).ChildNodes(0).getAttributeNode("page").NodeValue
Cells(i + 1, 8) = x(i).ChildNodes(1).ChildNodes(0).Text
Cells(i + 1, 9) = x(i).ChildNodes(1).ChildNodes(1).getAttributeNode("page").NodeValue
Cells(i + 1, 10) = x(i).ChildNodes(1).ChildNodes(1).Text
Next i
End Sub |
|