import xlwt wb = xlwt.Workbook() fruits_s = wb.add_sheet('sheet') # 创建sheet页 # fruits_s = fruits_s = wb.add_sheet('sheet',cell_overwrite_ok=True) # cell_overwrite_ok 参数设置单元格可以重复写 fruits_s.write(1,5,'字符串') # 写入数据(行,列, 要写入的内容) wb.save('./xlsdata.xls') # 保存文件
标签:xlwt,sheet,wb,cell,fruits,overwrite From: https://www.cnblogs.com/csysd/p/17687482.html