import xlwt

book=xlwt.Workbook() #新建一个excel
sheet=book.add_sheet('sheet1') #加sheet页
sheet.write(0,0,'姓名')
sheet.write(0,1,'年龄')
sheet.write(0,2,'性别')
book.save('stu.xls') #结尾一定要用.xls


posted on 2018-05-04 11:23  彼得潘jd  阅读(122)  评论(0编辑  收藏  举报