分析好久才弄出来的,经实测成功,望采纳...
Sub test()
Dim strUrl$, objHttp As Object, strRtn, arrRtn, i%, j%
strUrl = "http://f9.eastmoney.com/soft/gp13.php?code=00000202"
Set objHttp = CreateObject("msxml2.xmlhttp")
objHttp.Open "GET", strUrl, 0
objHttp.send
While objHttp.readystate <> 4
DoEvents
Wend
Cells.Clear '清除表格内容
Rows(2).NumberFormatLocal = "@" '第二行设置为文本格式
'取 "<table" 之后的内容
strRtn = Split(objHttp.responsetext, "<table", -1, vbTextCompare)(1)
'以 "宽神<tr>" 作为分隔符把数据分为行数组
strRtn = Split(strRtn, "<tr>", -1, vbTextCompare)
For i = 0 To UBound(strRtn) '行循环
'各个字段以 "<span>" 分隔
arrRtn = Split(strRtn(i), "<span>", -1, vbTextCompare)
For j = 1 To UBound(arrRtn) '慎中亏列循环
'取"</span>"之前的内容,并且把" "替换为空,然后输出到表格里
Cells(i + 1, j + 1) = Replace(Split(arrRtn(j), "</span>", -1, vbTextCompare)(0) _
, " ", "", 1, -1, vbTextCompare)
培拦 Next j
Next i
Set objHttp = Nothing
MsgBox "done..."
End Sub