(1) look for changes in formulas, which could indicate an error. Why is the formula for cell A99 different from that in A100?
(2) write formulas in Python/NumPy or another language that replicates the formulas.
(1) look for changes in formulas, which could indicate an error. Why is the formula for cell A99 different from that in A100?
(2) write formulas in Python/NumPy or another language that replicates the formulas.
For #1, there has been research on linting and automated semantic error or smell detection in Excel (e.g., https://github.com/ExceLint/ExceLint). Some features are live in Excel today!
For #2, Excel now supports Python.
I don't think you need to do any conversions, all of the necessary information exists in the spreadsheet.
How do you define a reusable function?
---
(I know the answer....it's a proper programming language.)
Abstractly.
Listing all possible inputs with their outputs, and then doing a lookup....that's only sometimes useful.
If we're talking Excel 2021, Excel 2019, etc. then no.
https://support.microsoft.com/en-us/office/create-custom-fun...
https://github.com/bradbase/xlcalculator
https://github.com/dgorissen/pycel
https://github.com/vinci1it2000/formulas
You give it an .xlsx file and it compiles to a Python representation where you can mutate "cells" and observe calculated results in other "cells", according to the formula DAG. Not sure about other languages but I'd be surprised if Python were the only one to have libraries like this.Funfact: it's more complicated than you think to implement these engines. There's no spec for the formulae, so you have to reverse-engineer based on observed behaviour. You run into a lot of strange edge cases in seemingly mundane arithmetic formulae, and type conversions are a constant source of surprise.
Emacs org-mode has tables, which you can use as spreadsheets [1]. The formulas are not written in the cells, but after the table, with one formula per line. You have to update the table every time you update the data or the formulas.
I once tried to use it, but it was way too difficult, and I went back to Libreoffice.