2018-04-1919:04:25

python生成excel文件

 

测试代码如下:

import openpyxl
import datetime
wb = openpyxl.Workbook()
ws = wb.active
ws.title = 'sheet'
ws['A1'] = 520
ws.append([1,2,3])
ws['A3'] = datetime.datetime.now()
wb.save('first.xlsx')

小甲鱼教程网址:https://www.bilibili.com/video/av15834715/?p=7

openpyxl官方文档:http://openpyxl.readthedocs.io/en/stable/

openpyxl模块可以使用pip命令安装

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-09-08
  • 2022-12-23
  • 2021-12-28
  • 2021-07-21
  • 2022-12-23
猜你喜欢
  • 2021-07-15
  • 2022-12-23
  • 2021-12-24
  • 2021-08-05
  • 2021-08-13
  • 2021-06-22
  • 2021-08-22
相关资源
相似解决方案