Export a Single Sheet of an Excel Spreadsheet as CSV from the Command Line with Open Office

/ Published in: Other
Save to your folder(s)

modified from branflake2267's post at oooforum.org:

Paste into the Standard.Module1 macro file. Then, create xls2csv bash script containing:

file="$(readlink -f "$1")"
/usr/lib/openoffice/program/soffice -invisible -headless -norestore "macro:///Standard.Module1.ConvertXls2Csv(\"$file\", \"$2\")"

The first argument is the xls file name, second is the name of the sheet:

`xls2csv ./spreadsheet.xls "Some Sheet"`

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.