AttributeError: 'MergedCell' object attribute 'hyperlink' is read-only

Issue #1260 resolved
Max Henke created an issue

using openpyxl=2.6.2

when loading a workbook, at least for some, the following error happens: wb = load_workbook(filename=path, data_only=True, keep_links=False) (tried without keep_links too)


wb = load_workbook(filename=path, data_only=True, keep_links=False)

File "C:\Users\XXX\AppData\Local\Programs\Python\Python37-32\lib\site-packages\openpyxl\reader\", line 312, in load_workbook

File "C:\Users\XXX\AppData\Local\Programs\Python\Python37-32\lib\site-packages\openpyxl\reader\", line 274, in read


File "C:\Users\XXX\AppData\Local\Programs\Python\Python37-32\lib\site-packages\openpyxl\reader\", line 228, in read_worksheets


File "C:\Users\XXX\AppData\Local\Programs\Python\Python37-32\lib\site-packages\openpyxl\worksheet\", line 405, in bind_all


File "C:\Users\XXX\AppData\Local\Programs\Python\Python37-32\lib\site-packages\openpyxl\worksheet\", line 373, in bind_hyperlinks[link.ref].hyperlink = link

AttributeError: 'MergedCell' object attribute 'hyperlink' is read-only

Comments (17)

  1. Max Henke reporter

    For everyone who doesn't need hyperlinks: I "solved" the problem for me by commenting out line 372 + 373 in "openpyxl\" but that doesnt solve the issue

  2. Doaa Altarawy

    What is the status of this bug in 3.0.x ?
    I can’t edit ‘some’ Mergedcells, including the value field.

  3. Pooja kalaje

    i am using openpyxl version 3.0.2 still i am facing below issue .

    'MergedCell' object attribute 'hyperlink' is read-only

  4. Log in to comment