To convert csv on the command line while LibreOffice is running, just skip the --headless
parameter. The following command (run in PowerShell) worked for me even while C:\TEMP\Untitled1.ods
resp. /tmp/Untitled1.ods
was opened in LibreOffice Calc:
Windows 10 (tested with LibreOffice 7.0.1)
& 'C:\Program Files\LibreOffice\program\soffice.exe' --convert-to csv --outdir C:\TEMP\ .\Untitled1.ods
Or similar, if the present working directory is C:\Program Files\LibreOffice\program\
:
.\soffice --convert-to csv --outdir C:\TEMP\ C:\TEMP\Untitled1.ods
Linux (tested with LibreOffice 6.4.6)
soffice --convert-to csv --outdir /tmp/ /tmp/Untitled1.ods
On linux, you could alternatively use the libreoffice
command instead of soffice
(seems to be linux-specific...):
libreoffice --convert-to csv --outdir /tmp/ /tmp/Untitled1.ods
In all cases, Untitled.csv
was created in the expected place.
libreoffice --headless
andunoconv
are working as designed. They are not designed to work on the same time as LibreOffice UI is running. – Disparage