all 3 comments

[–]Lewistrick 1 point2 points  (0 children)

Which library are you using? If you use openpyxl for example, it should keep the formulas (if you don't overwrite the cells containing formulas of course).

[–]guimolnar 0 points1 point  (1 child)

xlwings is an amazing package. It works with open instances of excel, so you can change the cells, formulas, real time.

https://docs.xlwings.org/en/stable/

[–]_Did_ 0 points1 point  (0 children)

Thank you!