返回列表 上一主題 發帖

上櫃股票融資融券餘額CSV下載問題

上櫃股票融資融券餘額CSV下載問題

各位大大您好:請問
上櫃股票融資融券餘額CSV下載 :
網址:http://www.otc.org.tw/ch/stock/margin_trading/margin_balance/margin_bal.php

以:http://www.otc.org.tw/ch/stock/margin_trading/margin_balance/margin_bal_download.php?d=103/01/03&s=0,asc,1

產生下情況
代號,  名稱,  前資餘額(張),  資買,  資賣,  現償,  資餘額,  資屬證金, 資使用率(%), 資限額,,  券餘額,  券屬證金,  券使用率(%), 券限額,  資券相抵(張),  備註
1259  ,"安心","303","2","0","0","305","6","3.77","8,097","0","0","0","0","0","0","0.0","8,097","0","1     C    "                                                                       
1333  ,"恩得利","0","0","0","0","0","0","0.0","21,275","0","0","0","0","0","0","0.0","21,275","0"," OX        "                                                                       

請大大指教 謝謝

謝謝大大 回應!
因我是由網上自學VBA , 故東拼西湊, 可否請大大指教, 我下列程式錯誤地方

' 上櫃股票融資融券餘額
Theurl = "http://www.otc.org.tw/ch/stock/margin_trading/margin_balance/margin_bal_download.php?d=" & Sdate & "&s=0"

   With ActiveSheet.QueryTables.Add(Connection:="URL;" & Theurl, Destination:=Range("b1"))
            .BackgroundQuery = True
            .RefreshStyle = xlOverwriteCells
            .RefreshPeriod = 0
            .AdjustColumnWidth = False
            .WebSelectionType = xlSpecifiedTables
            .WebFormatting = xlWebFormattingNone
            .WebTables = "1,2,3,4"
            .WebDisableDateRecognition = True         '關閉日期辨識
            .Refresh BackgroundQuery:=False
            .Delete

End With

會出現
1259  ,"安心","303","2","0","0","305","6","3.77","8,097","0","0","0","0","0","0","0.0","8,097","0","1     C    "

請大大指教 謝謝

TOP

感恩!! 學習中

TOP

        靜思自在 : 【時日莫空過】一個人在世間做了多少事,就等於壽命有多長。因此必須與時間競爭,切莫使時日空過。
返回列表 上一主題