import xlwtbook = xlwt.Workbook() # 新建一个excelsheet = book.add_sheet(‘测试‘) # 添加一个sheet页sheet.write(0, 0, ‘要写入的数据‘) # 第一个参数为行数,从0开始;第二个参数为列数,从0开始book.save(‘E:/测试用excel.xls‘) # 保存
python3 调用xlwt模块对excel执行写入操作
原文:https://www.cnblogs.com/tianyingz/p/12213077.html