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

 

相关文章: