von berndh » Mi, 04.10.2006 11:52
Hier also der Code Ich hoffe jemand kann helfen, Dankeschön
Function OpenCSVFile (sUrl As String) As Object
Dim fileProperties(2) As New com.sun.star.beans.PropertyValue
fileProperties(0).Name = "FilterName"
fileProperties(0).Value = "scalc: Text - txt - csv (StarOfficeCalc)"
fileProperties(1).Name = "FilterFlags"
fileProperties(1).Value = "59/9,34,IBMPC_850,1,1/1/1/1/1/1/1/1"
'59/9 --> columns are devided by ";" and tab
'34 --> text delimiter --> double qoutes (")
' IBMPC_850 --> charset (is a constant with the value 4)
' 0 is system charset
fileProperties(2).Name = "Hidden"
fileProperties(2).Value = True
OpenCSVFile = StarDesktop.loadComponentFromURL(sUrl, "_blank", 0,fileProperties())
End Function
Hier also der Code Ich hoffe jemand kann helfen, Dankeschön
[quote]
Function OpenCSVFile (sUrl As String) As Object
Dim fileProperties(2) As New com.sun.star.beans.PropertyValue
fileProperties(0).Name = "FilterName"
fileProperties(0).Value = "scalc: Text - txt - csv (StarOfficeCalc)"
fileProperties(1).Name = "FilterFlags"
fileProperties(1).Value = "59/9,34,IBMPC_850,1,1/1/1/1/1/1/1/1"
'59/9 --> columns are devided by ";" and tab
'34 --> text delimiter --> double qoutes (")
' IBMPC_850 --> charset (is a constant with the value 4)
' 0 is system charset
fileProperties(2).Name = "Hidden"
fileProperties(2).Value = True
OpenCSVFile = StarDesktop.loadComponentFromURL(sUrl, "_blank", 0,fileProperties())
End Function
[/quote]