简体   繁体   中英

How to run an sql query on an OpenOffice/LibreOffice spreadsheet from command line?

Well,

The title pretty much says it all. I have a set of ODS spreadsheets and I want to run some SQL queries over these spreadsheets and save the result on CSV files.

I know I can do that from the GUI, but I need to be able to do it from a batch file that will be run on a regular basis.

Solutions that make use of OpenOffice/LibreOffice Basic are acceptable, as well as solutions that require the use of some (free) plug-in.

Thanks in advance.

您可以先将.ods文件转换为.csv文件,然后对.csv文件进行处理(插入真实数据库中,将其读取为纯文本格式,等等)。

libreoffice --convert-to csv *.ods

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM