Type of "MergedCell" expected but type of "Cell" is delivered
With the attached excel sheet I expected the type of "MergedCell" for C10 & C11 but there comes the type of "Cell".
workbook = load_workbook(filename='./Testdata_ExcelExampleIssue.xlsx')
sheet = workbook.get_sheet_by_name('Testdata')
cells = sheet['C']
for cell in cells:
print(f'{cell}; {isinstance(cell, MergedCell)}')
Output:
<MergedCell 'Testdata'.C1> / True
<MergedCell 'Testdata'.C2> / True
<MergedCell 'Testdata'.C3> / True
<MergedCell 'Testdata'.C4> / True
<MergedCell 'Testdata'.C5> / True
<MergedCell 'Testdata'.C6> / True
<MergedCell 'Testdata'.C7> / True
<MergedCell 'Testdata'.C8> / True
<MergedCell 'Testdata'.C9> / True
<Cell 'Testdata'.C10> / False
<Cell 'Testdata'.C11> / False
<Cell 'Testdata'.C12> / False
<Cell 'Testdata'.C13> / False
<Cell 'Testdata'.C14> / False
<Cell 'Testdata'.C15> / False
<Cell 'Testdata'.C16> / False
<Cell 'Testdata'.C17> / False
Python V3.12.1; openpyxl V3.1.2