how to convert xlsx to tab delimited files
<p>I have quite a lot of xlsx files which is a pain to convert them one by one to tab delimited files </p>

<p>I would like to know if there is any solution to do this by python. Here what I found and what tried to do with failure 
This I found and I tried the solution but did not work <a href="https://stackoverflow.com/questions/17798864/mass-convert-xls-and-xlsx-to-txt-tab-delimited-on-a-mac">Mass Convert .xls and .xlsx to .txt (Tab Delimited) on a Mac</a></p>

<p>I also tried to do it for one file to see how it works but with no success </p>

<pre><code>#!/usr/bin/python
import xlrd
import csv


def main():
    # I open the xlsx file 
    myfile = xlrd.open_workbook('myfile.xlsx')
    # I don't know the name of sheet
    mysheet = myfile.sheet_by_index(0)
    # I open the output csv
    myCsvfile = open('my.csv', 'wb')
    # I write the file into it
    wr = csv.writer(myCsvfile, delimiter="\t")
    for rownum in xrange(mysheet.nrows):
        wr.writerow(mysheet.row_values(rownum))
    myCsvfile.close()
if __name__ == '__main__':
   main()
</code></pre>