1

I was trying to copy data from one excel sheet to another using openpyxl but I am getting ('MergedCell' object attribute 'value' is read-only) error. It is working fine when I am copying data from datasheets which doesn't contain merged cells.How can I copy data from sheet having merged cells?

Heres my code:

{for r in range(1,mr):
    for c in range(1,mc):
        ds3.cell(r,c).value=dbs1_3.cell(r,c).value}

Error:

AttributeError Traceback (most recent call last) in 1 for r in range(1,mr): 2 for c in range(1,mc): ----> 3 ds3.cell(r,c).value=dbs1_3.cell(r,c).value 4

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

Rohan
  • 11
  • 3
  • Have you seen this thread? https://stackoverflow.com/questions/23562366/how-do-i-get-value-present-in-a-merged-cell – APhillips Feb 18 '20 at 16:02

0 Answers0