Convert a CSV file to a XLS file on the linux command line? [closed]
Try using the ssconvert
tool from "gnumeric" package. On Debian, install the package with sudo apt-get install gnumeric
and then from the command-line, run:
ssconvert file.csv file.xls
This should do the job.
Why would you want to do that? Since you are not interested in adding or modifying data/metadata, you could just leave it as csv. CSV is associated with MS Excel by default, so whoever is going to open it, is going to get it opened in MS Excel.
If that does not work for you for some reason, keep in mind, that, as far as I know, you can generate a (sort of) valid xls file by using the following skeleton:
<table>
<tr>
<td>field0</td>
<td>field1</td>
..
<td>fieldX</td>
</tr>
... ad inf
</table>
(I am serious)
There is a python based solution on Sourceforge called csv2xls which may fit the bill.
It does not appear to be maintained at the moment (last activity was over a year ago) but if it does what you need then that shouldn't matter too much.