python 将数据写入Excel

import xlwt
Excel = xlwt.Workbook(encoding='utf-8', style_compression=0)
table = Excel.add_sheet('hello',cell_overwrite_ok=True)  #sheet名命名为hello

table.write(1,2,"hello")#第一行第二列写入hello(row,col,data)

Excel.save(r'world.xls') #Excel表保存为world.xls
原文地址:https://www.cnblogs.com/yaoliping/p/10019268.html