I am using openpyxl
library to write in existing Excel file in separate cells.
How do I write some text in Excel merged cell?
ERROR AttributeError: 'MergedCell' object attribute 'value' is read-only
when cells are merged:
CODE:
wb = openpyxl.load_workbook(filename=src)
for row in df_short.itertuples():
ws = wb[row.sheet]
try:
cell = 'N'+str(row.id)
ws[cell] = '=HYPERLINK("%s","#%s")' % (row.txt_path, row.txt)