Bash Script to Convert .csv to .xlsx
-
Can anyone help me with the bash script things to be used for the conversion of .csv to .xlsx files ?
Having the .csv files in one folder that have to be converted into .xlsx files
-
I don't think that that is an easy conversion at all, and BASH would not likely be the language to use for that. XSLX is a complicated format that does a lot that CSV does not. There is a reason that tools for this conversion process are sold, it's non-trivial.
-
-
I am in need for the Linux or for Mac with the help of Python if it is possible !!!
-
Maybe something using LibreOffices --convert-to command line option? For example:
soffice --convert-to xlsx:"Calc MS Excel 2007 XML" filename.csv --headless
Edit: Edited to change reference from Excel 2003 to 2007.
-
move command helps ?
-
@lakshmana said in Bash Script to Convert .csv to .xlsx:
move command helps ?
Not sure what you mean. But a move mv command will not be useful here.
-
@scottalanmiller mv test.csv test.xlsx will helps to convert the .csv files?
-
@lakshmana said in Bash Script to Convert .csv to .xlsx:
@scottalanmiller mv test.csv test.xlsx will helps to convert the .csv files?
No, simply renaming a file won't convert it, it's just renaming it. On Linux, the file extension doesn't even tell us the intent of a file, let alone alter the file itself.