问题
I want to read the formula value in an xlsx file, write the value in another cell and store the xlsx file.
I'm using the data_only mode
excelDoc = openpyxl.load_workbook(clientFile, data_only=True)
to read the formula value. But when I save the file all formulas are overriden by their values.
How can I prevent that?
回答1:
You can't. You can either have the values or the formulae.
来源:https://stackoverflow.com/questions/40000170/openpyxl-read-formula-value-without-changing-formula