I tried to do this in a previous job, it's _hard_. Our requirements were to use the math in a spreadsheet to calculate some results (basically actuaries created a set of formulae in the spreadsheet, we paste in the data and pull out the result). The best solution we found was to actually utilize LibreOffice and manipulate the spreadsheet using LibreOffice's Python API. There's no other solution that provides relatively complete implementations of Excel's functionality, and also updates cell values correctly taking into account complex formulae. And it was _painful_ and involved a very fiddly docker container image, a custom shell script with some LD_LIBRARY_PRELOAD magic, and some other hacks I don't even remember anymore.