for name in book.sheet_names():
    if name.endswith('2'):
        sheet = book.sheet_by_name(name)
rowIndex = -1
for cell in sheet.col(0):
    if 'john' in cell.value:
        break
if row != -1:
    cells = sheet.row(row)
for cell in cells:
    print(cell.value)
book.unload_sheet(name)
How can I open an Excel file in Python?