openpyxl unintentionally deletes linked cells

Viewed 69

I have created an excel document allowing to automate the updating of information on various excel sheets thanks to selenium and openpyxl. My main excel sheet is linked to specific cells of other sheets. However, after executing the script, the links are removed and replaced by the old values.

Do you know how to solve this problem? So that each cell in the main sheet remains linked to the other cells?

Here is the part of the code allowing to save to the desired excel column. This column is then linked under excel to the main sheet:

indicativecoupon = driver.find_element_by_css_selector('css').text
onlycoupon = indicativecoupon[:4]
ws["Y" + str(i)].value = onlycoupon
wb.save(filepath)
1 Answers

I've finally found the solution and it was a silly mistake from me. I had data only option on my workbook parameters..

Related