import openpyxl
wb=openpyxl.Workbook()  
#创建工作簿
sheet=wb.active 
sheet1=wb.active 
sheet2=wb.active 
#获取工作簿的活动表
sheet.title='暗影精灵5代HP' 
sheet1.title = 'HP惠普光影精灵6'
sheet2.title = 'HP惠普暗影精灵5游戏本2'
#工作表重命名

sheet['A1'] ='歌曲名'     #加表头,给A1单元格赋值
sheet['B1'] ='所属专辑'   #加表头,给B1单元格赋值
sheet['C1'] ='播放时长'   #加表头,给C1单元格赋值
sheet['D1'] ='播放链接'   #加表头,给D1单元格赋值


# 查找播放链接,把链接赋值给link
for i in range(10):
    sheet.append(['name','album','time','link'])

wb.save('a.xlsx')            
#最后保存并命名这个Excel文件

python快速建造一个表格

相关文章:

  • 2021-05-03
  • 2021-12-12
  • 2021-05-09
  • 2021-12-05
  • 2022-02-04
  • 2021-12-11
  • 2022-12-23
  • 2021-05-12
猜你喜欢
  • 2022-02-26
  • 2021-11-06
  • 2021-09-03
  • 2021-12-31
  • 2021-06-04
  • 2022-12-23
  • 2021-10-30
相关资源
相似解决方案