python excle 2 txt
#coding:utf-8from xlrd import open_workbookimport os, sysreload(sys)sys.setdefaultencoding("utf-8")wb = open_workbook('F:/******.xls')f = open("d:/list.txt", "w")for s in wb.sheets():print 'Sheet: ', s.namefor row in range(s.nrows):values = []for col in range(s.ncols):temp = s.cell(row, col).valueif temp != '':f.write(str(temp))values.append(temp)print valuesprint f.close()