I'm a fairly new Python user and I have an excel sheet that contains multiple unformatted tables. I am trying to iterate through column B with Python and openpyxl in order to find the headers of the respective table. When I find the header, I would like to save the row number in a variable. Unfortunately, the code is not running as intended and I am not receiving any error message. Below you can find a screenshot of a sample excel sheet as well as my code. Thank you for your help!
start = 1
end = 14
sheet = wb[('Positioning')]
for col in sheet.iter_cols(min_col=2,max_col=2, min_row = start, max_row=end):
for cell in col:
if cell.value == 'Table 1':
table1 = cell.row
elif cell.value == 'Table 2':
table2 = cell.row