John E. Martindale wrote:
Andrew Douglas Pitonyak <andrew <at> pitonyak.org> writes:
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, you have convinced me that I have to buy your book on openoffice macros!
If I can fit that code (I'm a 74 year old amateur) into the larger macro I
should have what I want. Thankyou!
I hope that you enjoy my book.
There is a new book by a different author that deals ONLY with cool
things that you can do with Calc. I believe that it is scheduled for
release in December. This new book does many similar things (including
displaying entire graphs and such of price history).
http://www.packtpub.com/openoffice-ooobasic-calc-automation/book
I know the contents pretty well because I am the technical editor. :-)
--
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]