我正在使用 LibreOffice 3.5.7.2 Build ID: 350m1(Build:2) 并希望从终端运行 LibreOffice calc 以打开 .xls 文档并输出到 .csv。我可以通过 GUI 执行此操作,只需打开 xls 文件并另存为 csv 并指定分隔符,但我希望能够通过终端执行此操作。
我做过的研究:
当我跑
> man libreoffice
Run Code Online (Sandbox Code Playgroud)
我得到:
SYNOPSIS
libreoffice [--accept=accept-string] [--base] [--calc] [--convert-to
output_file_extension[:output_filter_name]
Run Code Online (Sandbox Code Playgroud)
它有一个命令 --convert-to 输出,但我不确定它的例子会是什么样子,我试过:
libreoffice --convert-to csv:writer_csv_Export --outdir /Data/ *.xls
Run Code Online (Sandbox Code Playgroud)
正如https://help.libreoffice.org/Common/Starting_the_Software_With_Parameters/vi 所提到的,但它不起作用。