I want to get value of a merged cell that has range from D3 to H3 using openpyxl library.
As per my understanding most libraries read data from 1st cell itself. Thus the mer
I wrote this based on the latest source code from Openpyxl:
def getMergedCellVal(sheet, cell):
rng = [s for s in sheet.merged_cells.ranges if cell.coordinate in s]
return sheet.cell(rng[0].min_row, rng[0].min_col).value if len(rng)!=0 else cell.value