How to convert excel file to csv file or text file?

Hi all,

I need to find a way to convert excel file into csv or a text file in linux command. The reason is I have hundreds of files to convert. Another complication is the I need to delete the first 5 lines of the excel file before conversion.

so for instance

input.xls

description of files
date
la alalalalal
alalall
alalal
var1 var2 var3 var4 var5
1 2 3 4 5

output.csv or text file i want is

var1 var2 var3 var4 var5
1 2 3 4 5

Hope this is clear. Thanks!

I recall using xls2txt or the like. xls2txt - Google Search After that, the filtering and formatting is simple. The PERL bits even exist to do the newer xlsx.

csv is text... If it's saved as csv, fait accompli.

Above file "input.xls" definitely is neither EXCEL format - which is binary - nor CSV format. It's just a plain, space separated text file, as is "output.csv".

For chopping 5 first lines from text files, use e.g. awk 'NR>5' input.txt

Excel can both understand and create these files, nonetheless.

We can use a document converter to convert a file from 1 format to another. And it's easily available.

I took it that the input.xls file is xls, just described in text. So you need an xls2txt or xls2csv.

In the excel context, text had columns tab delimited, but CSV is more than comma deilimited, with quoting and quote escape rules. In the following example, this is one row of 3 cells in CSV:

1,2,"The strange man cried out ""You did't steal my hat, did you?""
I replied ""No, I certainly did not!"""