openpyxl创建excel

如下

from openpyxl import Workbook
wb=Workbook()
wb.create_sheet("log")
sheet1=wb["log"]
sheet1.cell(1,1).value="test"
wb.save("log.xlsx")
posted @ 2023-01-16 18:10  mghhz816  阅读(174)  评论(0编辑  收藏  举报