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

 

posted on 2018-11-26 11:15  oohy  阅读(3207)  评论(0编辑  收藏  举报