获取excel多列方法:

>>> colC = ws['C']
>>> col_range = ws['C:D']

采用python 实现时,开始列与结束列采用变量传入:
sheetgenerator=work_sheet["'"+start_col+":"+end_col+"'"]
执行以上方法时报错:ValueError: {0} is not a valid coordinate or range

解决办法:正确的方法,只需将“:”转换为字符串即可
sheetgenerator=work_sheet[start_col+":"+end_col]

相关文章:

  • 2022-12-23
  • 2021-08-10
  • 2021-07-26
  • 2021-08-01
  • 2021-04-21
  • 2021-04-05
  • 2022-12-23
  • 2021-07-15
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-07-12
  • 2021-08-08
  • 2022-01-01
  • 2021-09-08
  • 2022-12-23
相关资源
相似解决方案