ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] vba¤U¸ü¾ú¦~ªÑ²¼¸ê®Æ¡A ¦p¦óÃö±¼IE"À˵ø¤U¸ü"´£¿ôµøµ¡

[µo°Ý] vba¤U¸ü¾ú¦~ªÑ²¼¸ê®Æ¡A ¦p¦óÃö±¼IE"À˵ø¤U¸ü"´£¿ôµøµ¡

¥»©«³Ì«á¥Ñ mattlee1111 ©ó 2017-5-20 10:06 ½s¿è

¼g¤F¤@­Óvba·Q¤U¸üyahoo finance¾ú¦~ªÑ²¼¸ê®Æ¡A¦ýIE¨C¦¸³£·|¸õ¥X"À˵ø¤U¸ü"


ºô¤W¦³¤H»¡³]©wApplication.DisplayAlerts = False´N·|Ãö±¼´£¿ôµøµ¡¡A¦ý¸Õ¤F«Ü¤[ÁÙ¬OÃö¤£±¼¡A½Ð±Ð°ª¤â­Ì­n¦p¦ó­×§ï?

1.JPG (147.42 KB)

1.JPG

1.JPG (147.42 KB)

1.JPG

¸É¥Rµ{¦¡½X µ{¦¡½X.zip (393 Bytes)

TOP

´X¤Ñ«e yahoo finance ªº historical data ¤U¸üºô§}»PÀɮ׮榡¦³²§°Ê
½Ð°Ñ¦Ò¦p¤U°Q½×

(¤£¦n·N«äÅv­­¤£°÷©Ò¥HµLªk¶Kºô§}.½Ðgoogle¦p¤U¤T­Ó¥DÃD.¦U¦³¬ÛÃö°Q½×)

1.yahoo-finance-url-not-working

2.1005785-yahoo-finance-api-stock-quotes-changed

3.yahoo-historical-data-did-they-change-the-url-recently

¥i¯à¬O³o­ÓÃö«Y
©Ò¥Hyahoo financeºô­¶·í¤¤
¦pªG«öDownload Data«ö¶s¥i¥H¤U¸üªÑ»ù«ü¼Æªºcsv
¦Ó±NÂ^¨úªººô§}(query1¶}ÀY)ª½±µ¶K¨ìºô§}¦C¤¤¤]¥i¥H¦¨¥\¤U¸üªÑ»ù«ü¼ÆªºcsvÀÉ
¦ý¬O±N¤W­zÂ^¨ú¤U¨Óªººô§}¼g¦bvbaµ{¦¡½X¤¤
«o·|¦b°õ¦æ®ÉÅã¥ÜµLªkŪ¨ú¸Óºô­¶

½Ð°Ý¸Ó¦p¦ó³B²z
¤~¯à¹³¹L¥h¤@¼Ë¥Îvba¤U¸ücsv

¬Ocookieªº°ÝÃD¶Ü(¦]¬°¦³¤H´£¨ì¬OcrumbªºÃö«Y)
ÁÂÁÂ

TOP

¦^´_ 3# go2hk

«á¨Ó¦bºô¤W§ä¨ìµª®×¡Aµ{¦¡½X¦p¤U½Ð°Ñ¦Ò µ{¦¡½X2.zip (614 Bytes)
Sub testname()
stock_name = "hnp"
downprice (stock_name)
End Sub
Function downprice(stock_name)
'¤U¸üÀÉ®×
    Filename = Application.ActiveWorkbook.Name
    Dim myURL As String
    myURL = "yahoo financeºô§}, Åv­­¤£¨¬½Ð°Ñ¦Òµ{¦¡½X"
   
    Dim WinHttpReq As Object
    Set WinHttpReq = CreateObject("Microsoft.XMLHTTP")
    WinHttpReq.Open "GET", myURL, False
    WinHttpReq.send
   
    myURL = WinHttpReq.responseBody
    If WinHttpReq.Status = 200 Then
        Set oStream = CreateObject("ADODB.Stream")
        oStream.Open
        oStream.Type = 1
        oStream.Write WinHttpReq.responseBody
        oStream.SaveToFile ("D:\" & stock_name & ".csv")
        oStream.Close
    End If

End Function

TOP

¦ý¦³­Ó°ÝÃD´N¬O¡A¦b¿ì¤½«Çªº¹q¸£¥i¥H¤U¸ü¡A¦b®a¸Ìªº¹q¸£«o¨S¿ìªk¤U¸ü?
¦P¼Ë³£¬Oexcel 2000¡A§@·~¨t²Î³£¬Owin7¡Bie11
½Ð°Ý°ª¤â­Ìª¾¹D¬°¦ó??¬O¨º¸Ì¨S³]©w¦n??

TOP

mattlee1111¤j
«ö·Ó±zªþªºµ{¦¡½X(myURL¤w¦³¦Û¦æ­×§ï¦¨http..query1...........)
µ{¦¡¥i¥H°õ¦æ(°õ¦æ®É¨S¦³¥X¿ù)
¦ý¬O¨S¦³Àɮ׳Q¤U¸ü¦^¨Ó
½Ð°Ý¬O­þ­Ó³¡¤À»Ý­n¦A°µ­×§ï©Î³]©w¶Ü
ÁÂÁÂ

TOP

        ÀR«ä¦Û¦b : ¤â¤ß¦V¤U¬O§U¤H¡A¤â¤ß¦V¤W¬O¨D¤H¡F§U¤H§Ö¼Ö¡A¨D¤Hµh­W¡C
ªð¦^¦Cªí ¤W¤@¥DÃD