Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Here are a few more pointers for anybody else struggling with this.

This is the general format of convert-to (noting that on windows the parameter is -convert-to not --convert-to):

soffice --headless --convert-to <TargetFileExtension>:<NameOfFilter> file_to_convert.xxx

Use the link above (http://cgit.freedesktop.org/libreoffice/core/tree/filter/source/config/fragments/filters) to look for the filter names in the .xcu files.

For example, I wanted to convert to Excel 95 format so I found the MS_Excel_95.xcu filter and inside it has a name:

<node oor:name="MS Excel 95" oor:op="replace">
    ...

I could then try it out:

soffice --headless --convert-to xls:"MS Excel 97" filename.xlsx

(I needed this to get a non-xml version of an excel file)

Here are a few more pointers for anybody else struggling with this.

This is the general format of convert-to (noting that on windows the parameter is -convert-to not --convert-to):

soffice --headless --convert-to <TargetFileExtension>:<NameOfFilter> file_to_convert.xxx

Use the link above (http://cgit.freedesktop.org/libreoffice/core/tree/filter/source/config/fragments/filters) to look for the filter names in the .xcu files.

For example, I wanted to convert to Excel 95 format so I found the MS_Excel_95.xcu filter and inside it has a name:

<node oor:name="MS Excel 95" oor:op="replace">
    ...

I could then try it out:

soffice --headless --convert-to xls:"MS Excel 97" 95" filename.xlsx

(I needed this to get a non-xml version of an excel file)