See the example below.
from openpyxl import load_workbook
wb = load_workbook('example.xlsx')
sheet = wb.active
# Made of {'Choi': 10000, 'Kim': 20000, 'Lee': 15000}
pair_cell = dict(zip(map(lambda c:c.value, sheet['A']), map(lambda c:c.value, sheet['B'])))
print (pair_cell['Choi'])
10000
© 2024 OneMinuteCode. All rights reserved.