Well - of course, the ‘ods=“OpenDocument Spreadsheet Flat XML”’ format is invalid - could you please share where did you find that syntax, so that we could clarify/fix the wrong statement. The relevant help topic mentions how to properly specify the specific filter - using colon …
But then - the command with the proper syntax would not work, either. Because your conversion - from binary text document format DOC to spreadsheet ODS - does not generally make sense.
In general, when you try some automated conversion using --convert-to
, you possibly first want to test how to do that manually, using GUI. You first open the original file with LibreOffice - e.g., use “Open with LibreOffice” shell function, or somesuch, which invokes generic soffice file.ext
-like command. Then you try to save as/export to a desired file type, and see if it’s possible. If it is not, then likely it also won’t work in command like, unless you do some additional steps.
E.g., you might need to open the file specially. This is the case when people want to convert PDFs to text documents: by default, PDFs are opened using Draw module in LibreOffice; and Draw does not have export filters to save to text documents. But LibreOffice can import to Writer if told so explicitly - so one would need to specify import filter first, to be able then to export to desired text document format. So one would see that special treatment was needed when opening in GUI: one has to specify import filter in Open dialog explicitly - and that would give a hint about what is needed in automated scenario.
Or one could need to do an extra conversion step. This is the case here: only Calc can export to ODS - so you need to open document in Calc; but there’s no import filter for DOC in Calc. Still, there are text formats that may be imported to Calc: they are RTF and HTML. So - you could want to open your DOC in Writer, then export to RTF, then open the exported RTF in Calc (explicitly specifying import filter), then export to ODS … for whatever reason.