import xlrd
tb=xlrd.open_workbook(r'd:/x/book123.xlsx')
sht=tb.sheets()[0]
for x in range(1,sht.nrows):
with open(r'd:/x/%s.txt' % sht.cell_value(x,1),'w') as f:
f.write(sht.cell_value(x,1)+','+sht.cell_value(x,5)+','+sht.cell_value(x,6)+'\n')
数据发来看看