Sub 融资融券交易明细() Range(Cells(1, 1), Cells(1, 13)) = Array("代码", "", "简称", "融资融券余额差(元)", "交易日期", "融券卖出量(股)", "融券卖出量(股)", "融券余额(元)", "融券余量(股)", "还款额(元)", "融资买入额(元)", "融资融券总额(元)", "融资余额(元)") With CreateObject("WinHttp.WinHttpRequest.5.1") .Open "GET", "http://datainterface.eastmoney.com/EM_DataCenter/JS.aspx?type=FD&sty=MTE&mkt=2&code=002106&st=0&sr=1&p=1&ps=50000&js=var a={pages:(pc),data:[(x)]}", False '深证 '.Open "GET", "http://datainterface.eastmoney.com/EM_DataCenter/JS.aspx?type=FD&sty=MTE&mkt=1&code=600111&st=0&sr=1&p=1&ps=50000&js=var a={pages:(pc),data:[(x)]}", False'上证 .send s = .ResponseText With CreateObject("scriptcontrol") .Language = "jscript" .addcode s For i = 0 To .Eval("a.data.length") - 1 For j = 0 To 12 Range(Cells(i + 2, 1), Cells(i + 2, 13)) = Split(.Eval("a.data[" & i & "]"), ",") Next j Next i End With End With Cells.Columns.AutoFit End Sub
时间: 2024-09-29 16:57:26