openpyxl使用sheet.rows或sheet.columns报TypeError: 'generator' object is not subscriptable解决方式



解决方案:


   因为新版本的openpyxl使用rows或者columns返回一个生成器所以可以使用List来解决报错问题


    



>>> sheet.columns[0]
Traceback (most recent call last):
  File "