|
Sub cc()
Dim arr(1 To 100000, 1 To 16)
Cells.ClearContents
Set oDoc = CreateObject("htmlfile")
[a1:d1] = Array("序号", "股票代码", "股票简称", "销售毛利率" & Chr(10) & "%")
With CreateObject("MSXML2.XMLHTTP")
For p = 1 To 73
.Open "GET", "http://data.eastmoney.com/bbsj/201803/yjbb.html", False
.Send
oDoc.body.innerHTML = StrConv(.responsebody, vbUnicode)
Set r = oDoc.All.tags("table")(0).Rows
For i = 0 To r.Length - 1
k = k + 1
For x = 1 To 16
arr(k, x) = r(i).Cells(x - 1).innerText
Next
Next
Set r = Nothing
Next
End With
Range("A2").Resize(k, 6) = arr
End Sub
哪位给看看上面程序有什么问题哦
|
|