Python: get entire workbook data cell by cell


import openpyxl

book=openpyxl.load_workbook("D:\\Automation\\QEDGE\\WorkingProject\\PythonLearning\\Resources\\excel.xlsx")
sName=book.sheetnames
for s in sName:
    sheet=book[s]
    #sheet=book.get_sheet_by_name("Sheet1")
#     cells=sheet['A1':'B5']
    for row in sheet.__iter__():
#         print(row)
        for cell in row:
            print(cell.value)
book.close()

Comments

Popular posts from this blog

Test Batch Runner - Run QTP Scripts from xls file

Selenium: db and excel data into maps