python实现Excel文件数据写入
import xlsxwriter
#todo 创建excel文件
xl = xlsxwriter.Workbook('/Users/edz/Desktop/test.xlsx')
#todo 添加sheet
sheet = xl.add_worksheet('sheet1')
#todo 往单元格cell添加数据,索引写入
sheet.write_string(0, 1, 'username1')
#todo 位置写入
sheet.write_string('B1', 'password')
#
原创
2021-04-23 08:32:11 ·
171 阅读 ·
0 评论