I need help with automating downloads

Author Message
dj

  • Total Posts : 3
  • Scores: 0
  • Reward points : 0
  • Joined: 5/21/2007
  • Status: offline
I need help with automating downloads Monday, May 21, 2007 1:39 PM (permalink)
0
The Yahoo Finance site provides free downloads of historical stock market data. I want to automate the download process, but don't know how. Any ideas?
 
DJ
 
 
#1
    dm_4ever

    • Total Posts : 3687
    • Scores: 82
    • Reward points : 0
    • Joined: 6/29/2006
    • Location: Orange County, California
    • Status: offline
    RE: I need help with automating downloads Monday, May 21, 2007 3:17 PM (permalink)
    0
    What is the URL you access for this? How do you do it manually?
    dm_4ever

    My philosophy: K.I.S.S - Keep It Simple Stupid
    Read Me: http://www.visualbasicscript.com/m_24727/tm.htm
    Frequently Asked Stuff: http://www.visualbasicscript.com/m_47117/tm.htm
     
    #2
      dj

      • Total Posts : 3
      • Scores: 0
      • Reward points : 0
      • Joined: 5/21/2007
      • Status: offline
      RE: I need help with automating downloads Monday, May 21, 2007 9:01 PM (permalink)
      0
      The URL to access stock data for the company Google.com, for example, is < http://finance.yahoo.com/q/hp?s=GOOG>. When I download manually, I click the link <Download To Spreadsheet> at the bottom of this page. Then the standard dialog box opens up to ask where to store the data.
       
      dj
       
       
      #3
        dm_4ever

        • Total Posts : 3687
        • Scores: 82
        • Reward points : 0
        • Joined: 6/29/2006
        • Location: Orange County, California
        • Status: offline
        RE: I need help with automating downloads Tuesday, May 22, 2007 2:36 AM (permalink)
        0
        I found this which may work for you.


         Dim DataBin 
         Dim HTTPGET 
         Set HTTPGET = CreateObject("Microsoft.XMLHTTP") 
         HTTPGET.Open "GET", "http://ichart.finance.yahoo.com/table.csv?s=GOOG&d=4&e=22&f=2007&g=d&a=7&b=19&c=2004&ignore=.csv", False 
         HTTPGET.Send 
         DataBin = HTTPGET.ResponseBody 
         Const adTypeBinary=1 
         Const adSaveCreateOverWrite=2 
         Dim SendBinary 
         Set SendBinary = CreateObject("ADODB.Stream") 
         SendBinary.Type = adTypeBinary 
         SendBinary.Open 
         SendBinary.Write DataBin 
         SendBinary.SaveToFile "c:\temp\google.csv", adSaveCreateOverWrite 
         

        <message edited by dm_4ever on Tuesday, May 22, 2007 2:52 AM>
        dm_4ever

        My philosophy: K.I.S.S - Keep It Simple Stupid
        Read Me: http://www.visualbasicscript.com/m_24727/tm.htm
        Frequently Asked Stuff: http://www.visualbasicscript.com/m_47117/tm.htm
         
        #4
          dj

          • Total Posts : 3
          • Scores: 0
          • Reward points : 0
          • Joined: 5/21/2007
          • Status: offline
          RE: I need help with automating downloads Tuesday, May 22, 2007 10:21 AM (permalink)
          0
          Thanks for your help dm_4ever. This code works great!
           
          dj
           
          #5

            Online Bookmarks Sharing: Share/Bookmark

            Jump to:

            Current active users

            There are 0 members and 1 guests.

            Icon Legend and Permission

            • New Messages
            • No New Messages
            • Hot Topic w/ New Messages
            • Hot Topic w/o New Messages
            • Locked w/ New Messages
            • Locked w/o New Messages
            • Read Message
            • Post New Thread
            • Reply to message
            • Post New Poll
            • Submit Vote
            • Post reward post
            • Delete my own posts
            • Delete my own threads
            • Rate post

            2000-2012 ASPPlayground.NET Forum Version 3.9