Ask Your Question

basic loadComponentFromURL

asked 2016-01-27 21:26:07 +0200

BobW gravatar image

updated 2016-03-10 11:38:56 +0200

Alex Kemp gravatar image

My version of LibreOffice is
My operating system is OSX 10.11.3
I have written a Basic macro in a Calc spreadsheet to retrieve mutual fund history from yahoo finance.
This is the macro.

Sub Main
   get_history "VWIAX"
End Sub
Sub get_history(ticker as String)
   Dim Url as String
   Dim oDoc as Object
   Dim oArg(0) As New
   Url = "" & ticker & "&g=m&ignore=.csv"
   Print Url
   oArg(0).Name = "FilterOptions"
   oArg(0).Value = "44"
   oDoc = starDeskTop.loadComponentFromURL(Url, "_blank", 0, oArg)
End Sub

The last step "starDeskTop.loadComponentFromURL(..." hangs on some ticker symbols but not others.
Some tickers which hang are VGSLX, FCNTX and VWIAX.
Some tickers which do not hang are FGMNX, FPURX

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2016-02-01 08:10:49 +0200

JohnSUN gravatar image

IMHO, that such a request is more correct

Url = "" + ticker + "&c=2001&f=2016&g=m&ignore=.csv"

(If you want "months" g=m, then you need to specify the start and end year)

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2016-01-27 21:26:07 +0200

Seen: 1,485 times

Last updated: Feb 01 '16