Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import xlrd
- import csv
- def csv_from_excel():
- wb = xlrd.open_workbook('Your_excel_file.xlsx')
- sh = wb.sheet_by_name('Sheet_name')
- dane3 = open('Name_of_new_csv_file.csv', 'w')
- wr = csv.writer(Name_of_new_csv_file, quoting=csv.QUOTE_ALL)
- for rownum in range(sh.nrows):
- wr.writerow(sh.row_values(rownum))
- Name_of_new_csv_file.close()
- # runs the csv_from_excel function:
- csv_from_excel()
Add Comment
Please, Sign In to add comment