|
- Sub 股票()
- Set oDom = CreateObject("htmlfile")
- Set oWindow = oDom.parentWindow
- Set oHttp = CreateObject("winHttp.winHttpRequest.5.1")
- r = 1
- For y = 1 To 3 '设置读取页数
- oHttp.Open "GET", "http://vip.stock.finance.sina.com.cn/quotes_service/api/json_v2.php/Market_Center.getHQNodeData?page=" & y & "&num=40&sort=symbol&asc=1&node=hs_a&symbol=&_s_r_a=init", False
- oHttp.send
- stext = oHttp.responseText
- If stext = "null" Then Exit Sub
- oWindow.execScript "o=" & stext
- For i = 0 To oWindow.eval("o.length") - 1
- r = r + 1
- oWindow.execScript "oi=o[" & i & "];a=[];for(x in oi){a.push(oi[x])}"
- ar = Split(oWindow.a, ",")
- For j = 1 To 13
- k = IIf(j = 1, 0, j)
- Cells(r, j) = ar(k)
- Next j
- Next i
- Next y
- End Sub
复制代码 |
评分
-
2
查看全部评分
-
|