def save_detail(self):
book=xlwt.Workbook()
sheet=book.add_sheet('sheet1',cell_overwrite_ok=True)
heads=[u'??',u'??',u'??',u'????',u'??']
ii=0
for head in heads:
sheet.write(0,ii,head)
ii+=1
container=self.get_detail()
f=open(r'F:\Desktop\DouBan2.txt','w')
i=1
for list in container:
f.writelines(list[5].encode('utf-8'))
list.remove(list[5])
j=0
for data in list:
sheet.write(i,j,data)
j+=1
i+=1
f.close()
print u'\n\n',u'??txt???'
book.save('DouBan2.xls')
print u'\n\n',u'??Excel??!'
评论列表
文章目录