Python Forum

Full Version: Openpyxl: Excel formula & condition formatting removed
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I need to read and write to an xlsm excel file. I used the below

import openpyxl
wb=openpyxl.load_workbook(file, data_only=True, read_only=False, keep_vba=True)
But I get the warning "conditional formatting is not supported and will be removed"
In my xlsm file:

Some of my conditioning format get removed, but not all
My formula are also converted to values.
I noted that the conditional formatting and formula that are removed have links to another sheet in my xlsm file.

How do I solve this?
I can't use "data_only=False" as I need Python to read the values of some formula.
Thank you