Hi HP
So first of all I tried your macro with the LibreOffice 4.2.0 and did not experience any problems, once I set up a valid url of course. I used the following code.
Sub TryToOpenCsvFromTheInternet
Dim loadArgs2(1) as New com.sun.star.beans.PropertyValue
lurl = "http://download.finance.yahoo.com/d/quotes.csv?s=%40^DJI,GOOG&f=nsl1op&e=.csv"
lsfo = "44/32,34,ANSI,2,"
loadArgs2(0).Name = "FilterName"
loadArgs2(0).Value = "Text - txt - csv (StarCalc)"
loadArgs2(1).Name = "FilterOptions"
loadArgs2(1).Value = lsfo
lDoc = StarDesktop.LoadComponentFromURL(lurl,"_blank",0,loadArgs2())
lSheet = lDoc.Sheets().getByIndex(0)
End Sub
When it comes to the documentation of the filter options this is probably as close as you get:
https://wiki.openoffice.org/wiki/Documentation/DevGuide/Spreadsheets/Filter_Options#Filter_Options_for_the_CSV_Filter
There is also a simple and effective way to find out different options, as described by Villeroy [1]
<quote>
Open the csv manually with all bells and whistles. Then run the following code and copy the FilterOptions.
Sub showFilterOptions()
Dim args(),i%
args() = ThisComponent.getArgs()
for i = 0 to uBound(Args())
if args(i).Name = "FilterOptions" then inputbox args(i).Name,"",cStr(args(i).value)
next
End Sub|
<end of quote>
[1] http://140.211.11.67/en/forum/viewtopic.php?t=58105&p=256500#p256500
Med vänlig hälsning
Niklas Johansson
HP4 skrev 2014-02-25 16:57: