读取excel 文件的数据 import csv with open('D:/mystuff/11.csv','r') as f: reader = csv.reader(f) for row in reader: print(row) 写入excel文件 import csv with open('D:/mystuff/33.csv', mode='w') as csvfile: #w1=csv.writer(csvfile,delimiter=' ',quotechar="|",q…
Python 读写 Excel 基本上, 这个网页已经说明一切了: http://pypi.python.org/pypi/xlrd 等有时间再把这个页面写漂亮,现在先记一些代码. 读Excel 先建个simple.xls from xlrd import open_workbook wb = open_workbook('simple.xls','rb')for s in wb.sheets(): print 'Sheet:',s.name for row in range(s.n…