- Sub t()
- Dim arr(1 To 1000, 1 To 9), p%
- With CreateObject("Microsoft.XMLHTTP")
- For p = 1 To 5
- .Open "GET", "http://data.eastmoney.com/DataCenter_V3/stock2016/jymx.ashx?pagesize=50&page=" & p & "&js=var%20xVUtQFae¶m=&sortRule=-1&sortType=&gpfw=0&code=80154448&rt=25607722", True
- .Send
- Do Until .ReadyState = 4
- DoEvents
- Loop
- brr = Split(StrConv(.responseBody, vbUnicode, &H804), "SName")
-
- For i = (p - 1) * 50 + 1 To UBound(brr) - 1 + (p - 1) * 50
- arr(i, 1) = Split(brr(i - (p - 1) * 50), """")(10)
- arr(i, 2) = Split(brr(i - (p - 1) * 50), """")(2)
- arr(i, 3) = Split(brr(i - (p - 1) * 50), """")(58)
- arr(i, 4) = Split(brr(i - (p - 1) * 50), """")(50)
- arr(i, 5) = Split(brr(i - (p - 1) * 50), """")(26)
- arr(i, 6) = Split(brr(i - (p - 1) * 50), """")(38)
- arr(i, 7) = Split(brr(i - (p - 1) * 50), """")(70)
- arr(i, 8) = Split(brr(i - (p - 1) * 50), """")(34)
- arr(i, 9) = Split(brr(i - (p - 1) * 50), """")(129)
-
- Next i, p
- [a2].Resize(UBound(arr), 9) = arr
- End With
- End Sub
复制代码 |