Openpyxl How to get row from worksheet by index

后端 未结 2 1726
有刺的猬
有刺的猬 2021-02-07 10:11

Using Openpyxl and python3.5, I tried getting the first row from an excel worksheet using a subscript but I an error.

# after getting filename
# after loading w         


        
2条回答
  •  悲哀的现实
    2021-02-07 10:41

    I finally found the answer in the documentation:

    first_row = worksheet[1]
    # worksheet[row_index_from_1]
    

    This worked for me.

提交回复
热议问题