3 ms·
Definitely has me wondering: there are lots of regex compilers out there, so where are the spreadsheet compilers? I should be able to convert a spreadsheet whol
by kevingadd 3y ago
Definitely has me wondering: there are lots of regex compilers out there, so where are the spreadsheet compilers? I should be able to convert a spreadsheet wholesale to Java or c# that clearly expresses the cell relationships, then go in and add names (if they aren't already there)
- KMag 3y ago20 years ago, I was told there was such a beast for turning an Excel spreadsheet into a C# application, targeted at accelerating/productionizing financial models. I never used it, though.
- _dain_ 3y agoI know of some Python libraries that do this: 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.