码迷,mamicode.com
首页 > 其他好文 > 详细

融资融券交易明细

时间:2015-05-14 14:16:56      阅读:122      评论:0      收藏:0      [点我收藏+]

标签:javascript   vba   excel   json   

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

融资融券交易明细

标签:javascript   vba   excel   json   

原文地址:http://blog.csdn.net/a814153a/article/details/45719453

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!