openpyxl模块介绍 ——创建excel表格 ——并写入数据
from openpyxl import Workbook wb=Workbook() #创建一个工作表 ws=wb.active #ws操作sheet页 ws1=wb.create_sheet('Mysheetfirst',0) #--------------------------------------------------------- ws1['A1'] = 'juankuan' ws1['E1'] = '中国' ws1['F1'] = '2020-02-27-09-51-02' #----------------------------------------------- wb.save('C:\\Users\\del\\Desktop\\xxxxxx.xlsx')