Hey Marc,
Marc Santhoff schrieb:
[..]
> I would rather change the macro using another technique, ucb or the
> like, for writing files than tell the users to install something else
> (because my macro program is not able to ...).
I am writing my csv files using ucb. In this case I can even pass the
encoding-type for output file.
So, try this:
oSFA = createUnoService("com.sun.star.ucb.SimpleFileAccess")
oOutputStream = createUnoService("com.sun.star.io.TextOutputStream")
oDatei = oSFA.OpenFileReadWrite(sURL) 'sURL should be the URL of your
csv-file
oOutputStream.SetOutputStream(oDatei.getOutPutStream)
sString = "this is your text(first line)..." & chr(13) & chr(10)
sString = sString & "and now line 2..."
oOutputStream.writeString(sString)
'Again add a windows line-feed:
oOutputStream.writeString(chr(13) & chr(10))
'close the file
oOutPutStream.closeOutput()
best regards
Thomas
--
## Marketing deutschsprachiges Projekt
## http://de.openoffice.org - www.openoffice.org
## Vorstand OpenOffice.org Deutschland e.V.
## Mitglieder willkommen: www.OOoDeV.org
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]