|
楼主 |
发表于 2015-3-9 19:15
|
显示全部楼层
5.新股申购与中签查询- Sub main()
- Dim js As Object, arr, Db
- Dim i%, j%, Total%
- Set js = CreateObject("scriptcontrol")
- js.Language = "jscript"
- With CreateObject("msxml2.xmlhttp")
- .Open "GET", "http://datainterface.eastmoney.com/EM_DataCenter/JS.aspx?type=NS&sty=NSST&st=12&sr=-1&p=1&ps=1&js=(pc),(x)&stat=1&rt=" & Rnd(), False
- .send
- Total = Split(.responsetext, ",")(0)
- .Open "GET", "http://datainterface.eastmoney.com/EM_DataCenter/JS.aspx?type=NS&sty=NSST&st=12&sr=-1&p=1&ps=" & Total & "&js=var%20rxSJdnPK={pages:(pc),data:[(x)]}&stat=1&rt=" & Rnd, False
- .send
- js.addcode .responsetext
- End With
- ReDim arr(1 To Total, 1 To 26)
- i = 0
- For Each Db In js.eval("rxSJdnPK.data")
- i = i + 1
- For j = 1 To 26
- arr(i, j) = Split(Db, ",")(j - 1)
- Next j
- Next Db
- Cells.Clear
- [a1].Resize(Total, 26) = arr
- End Sub
复制代码 |
|