von craig22 » Mi, 15.12.2021 17:55
Hallo Ingo,
ich öffne eine CSV-Datei z.B. so:
Code: Alles auswählen
REM ...................................
REM CSV-Datei öffnen
if len(sUrl)>0 then
dim mFileProps(2) as new com.sun.star.beans.PropertyValue
mFileProps(0).Name = "FilterName" : mFileProps(0).Value = "Text - txt - csv (StarCalc)"
' der erste Token (44) der Filteroptionen gibt den Datenfeld-Separator an:
' Komma = 44
' Semikolon = 59
mFileProps(1).Name = "FilterOptions" : mFileProps(1).Value = "59,34,76,1,,0,false,true,true,false"
' Datei im Hintergrund öffnen
mFileProps(2).Name = "Hidden" : mFileProps(2).Value = False
oDocCSV = StarDesktop.loadComponentFromURL(sUrl, "_blank", 0, mFileProps())
end if
' das erste Token (
59) der Filteroptionen gibt den Datenfeld-Separator an:
' Semikolon =
59
mFileProps(1).Name = "FilterOptions" : mFileProps(1).Value = "
59,34,76,1,,0,false,true,true,false"
Hallo Ingo,
ich öffne eine CSV-Datei z.B. so:
[code]
REM ...................................
REM CSV-Datei öffnen
if len(sUrl)>0 then
dim mFileProps(2) as new com.sun.star.beans.PropertyValue
mFileProps(0).Name = "FilterName" : mFileProps(0).Value = "Text - txt - csv (StarCalc)"
' der erste Token (44) der Filteroptionen gibt den Datenfeld-Separator an:
' Komma = 44
' Semikolon = 59
mFileProps(1).Name = "FilterOptions" : mFileProps(1).Value = "59,34,76,1,,0,false,true,true,false"
' Datei im Hintergrund öffnen
mFileProps(2).Name = "Hidden" : mFileProps(2).Value = False
oDocCSV = StarDesktop.loadComponentFromURL(sUrl, "_blank", 0, mFileProps())
end if[/code]
' das erste Token ([color=#FF0000][b]59[/b][/color]) der Filteroptionen gibt den Datenfeld-Separator an:
' Semikolon = [color=#FF0000][b]59[/b][/color]
mFileProps(1).Name = "FilterOptions" : mFileProps(1).Value = "[b][color=#FF0000]59[/color][/b],34,76,1,,0,false,true,true,false"