MergedCell does not have attribute 'value'
Created originally on Bitbucket by cosminpolifronie (Cosmin Polifronie)
Hello. I am using openpyxl to parse an Excel document that uses lots of merged cells. In 2.6, the following piece of code doesn't work anymore:
#!python
for col in source.iter_cols(current_col, current_col, row, row + 3):
values = []
for item in col:
values.append(item.value)
The append method works fine for normal cells, but when item
is of type MergedCell
then the value
attribute is not available anymore.
This issue has been introduced in 2.6 (2.5.14 works fine). Does it have anything to do with this change in 2.6?
Implement robust for merged cells so that these can be formatted the way Excel does without confusion. Thanks to Magnus Schieder.
Is it intentional? If yes, how should I retrieve the cell's value?