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)
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
|
|
|
|
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)
What is the URL you access for this? How do you do it manually?
|
|
|
|
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)
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
|
|
|
|
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)
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>
|
|
|
|
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)
Thanks for your help dm_4ever. This code works great! dj
|
|
|
|