If you've reached the limits of what can be done in an Excel spreadsheet, use this tool to convert the .xlsx spreadsheet file to a Python .py script.
./xlsx2py example.xlsx > example.py
Another example:
$ ./xlsx2py --print 'Sheet_Sheet2.A2()' example.xlsx | python3
13.5
$
See the pytest unit test for more examples. To run the pytest unit test:
python3 -m pytest -sv