打开已经存在的excel表格进行读取:
import xlrd
xlsx = xlrd.open_workbook(“d:/成绩表.xls”)
table = xlsx.sheet_by_index(0)
print(table.cell_value(0,3))
print(table.cell(0,3).value)
print(table.row(0)[3].value)
python中Excel的使用
新建一个excel表格:
import xlwt
new_workbook = xlwt.Workbook()
work_sheet = new_workbook.add_sheet(“测试20191119”)
work_sheet.write(0,0,“test”)
new_workbook.save(“d:/test.xls”)
python中Excel的使用

相关文章:

  • 2021-05-07
  • 2021-06-20
  • 2021-09-13
  • 2022-02-03
  • 2022-12-23
  • 2021-05-27
  • 2021-11-07
  • 2021-05-26
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-08-07
  • 2022-12-23
  • 2021-10-12
  • 2021-12-25
  • 2021-12-25
相关资源
相似解决方案