The fast and furious converter excel format csv into xls.
- First, install golang: https://go.dev/doc/install
- Then type in console:
$ go install github.com/sergrom/csv2xls/[email protected]
To see parameters and options type:
$ csv2xls -h
To convert file.csv
file to xls run the command below:
$ csv2xls -csv-file-name="file.csv" -xls-file-name="file.xls"
--csv-file-name
- The csv file you want to convert. Mandatory parameter.
--xls-file-name
- The xls file name that will be created. Mandatory parameter.
--csv-delimiter
- The delimiter that used in csv file. Optional parameter. Default value is semicolon - ";".
--title
- The Title property of xls file. Optional parameter.
--subject
- The Subject property of xls file. Optional parameter.
--creator
- The Creator property of xls file. Optional parameter.
--keywords
- The Keywords property of xls file. Optional parameter.
--description
- The Description property of xls file. Optional parameter.
--last-modified-by
- The LastModifiedBy property of xls file. Optional parameter.
For example you have csv file with name cities.csv and you want to convert it into xls excel format. The content of csv file is, for example:
№,City,Population 1,Moscow,"12,537,954" 2,"St Petersburg","5,467,808" 3,"Krasnoyarsk","1,137,494"
You can convert it by running command in your terminal:
./csv2xls -csv-file-name="cities.csv" -xls-file-name="cities.xls" -csv-delimiter=","
And then you will have a newly created file cities.xls in the same directory.
Enjoy)