With the following code I convert an XLSX into CSV. I need to delete the first 10 lines of the resulting csv. How could I do it?
# encoding=utf8
import sys
import xlrd
import csv
reload(sys)
sys.setdefaultencoding('utf8')
def csv_from_excel():
wb = xlrd.open_workbook('excel.xlsx')
sh = wb.sheet_by_name('Sheet1')
your_csv_file = open('your_csv_file.csv', 'w')
wr = csv.writer(your_csv_file, quoting=csv.QUOTE_ALL)
for rownum in range(sh.nrows):
wr.writerow(sh.row_values(rownum))
your_csv_file.close()
# runs the csv_from_excel function:
csv_from_excel()