John E. Martindale wrote:
Niklas Nebel <Niklas.Nebel <at> Sun.COM> writes:
Paul_B wrote:
http://finance.yahoo.com/d/quotes.csv?s=SUNW&f=sl1d1t1c1ohgv&e=.csv
It yields the following data:
"SUNW",5.59,"11/22/2006","4:00pm",+0.05,5.58,5.64,5.55,44316292
Using the link in the Import External Data dialog doesn't work
because the defined range required is not a local range but one
in the remote file, which doesn't exist in this case.
Use a linked sheet (and simple formulas if you need the values on
another sheet).
2) how would I open the remote data for /several/ stock symbols
into the same sheet?
Yahoo lets you specify several stock names, separated by "+".
Niklas
I have struggled for two weeks with this exact problem! Why can't openoffice
handle the URL
"http://quote.yahoo.com/d/quotes.csv?s=MSFT&f=sl1d1t1c1ohgv&e=.csv", when
Firefox handles it perfectly. Obviously earlier openoffice did handle it but now
cannot. See the thread at http://www.oooforum.org/forum/viewtopic.phtml?t=4103.
Well, this works! It gets the stock prices for Qwest (Q) and HP and
stores it in a calc document.
Sub two_stock_prices()
Dim sUrl As String
Dim oDoc as Object
Dim oPropertyValue(0) As New com.sun.star.beans.PropertyValue
sUrl = "http://finance.yahoo.com/d/quotes.csv" & _
"?s="& Join (Array("Q", "HP"),"&s=") & _
"&f=sl1d1&e=.csv"
oPropertyValue(0).Name = "FilterOptions"
oPropertyValue(0).Value = "44"
oDoc = StarDesktop.loadComponentFromURL( sUrl, "_blank", 0,
oPropertyValue)
End Sub
--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info: http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]