Is there a way, ideally using the command line, to convert multiple .csv files to one multi-sheet .xls spreadsheet?

Is there a way, ideally using the command line, to convert multiple .csv files to one multi-sheet .xls spreadsheet?

If there isn't a cli solution, it'd be good to know if there's an API that works in, ideally, awk or pascal, but, failing that, in pretty-well anything.


Solution 1:

You can use the command ssconvert.

ssconvert example.csv example.xls

To do it for multiple files you have to make a bash loop over csv files and do the job. Here a hint:

for i in *.csv; do ssconvert "$i" "${i%.*}".xls; done

EDIT:

To convert and merge into one single xls file also you still can use ssconvert.

ssconvert --merge-to=output.xls file1.csv file2.csv ....

or easily

ssconvert --merge-to=output.xls *.csv