1 import xlsxwriter
 2 
 3 #创建文件,并创建一个表格
 4 workbook=xlsxwriter.Workbook('demo.xlsx')
 5 worksheet=workbook.add_worksheet()
 6 
 7 #在指定的位置写入数据
 8 worksheet.write("A1","陈果子")
 9 worksheet.write("A2","i love you")
10 
11 #关闭文件
12 workbook.close()