I'm getting this error "SyntaxError: multiple statements found while compiling a single statement" when trying to import xlrd in python on Windows.
I have installed the newest version xlrd and python(3.7.0). Can you please help me figure out what the problem is?
import xlrd
import unicodecsv
def xls2csv (sheet1.xlsx, sheet1.csv):
wb = xlrd.open_workbook(sheet1.xlsx)
sh = wb.sheet_by_index(2)
fh = open(sheet1.csv,"wb")
csv_out = unicodecsv.writer(fh, encoding='utf-8')
for row_number in xrange (sh.nrows):
csv_out.writerow(sh.row_values(row_number))
fh.close()