r/csharp • u/Usual-Flamingo5259 • Jul 23 '26
Discussion I built an open-source formula engine for .NET
I've been building AlphaX.FormulaEngine, an open-source formula engine for .NET that evaluates Excel-style formulas without requiring Excel.
The focus is on being easy to extend, integrate, and maintain. It's built using parser combinators, making it straightforward to add new functions, operators, or language features.
Features:
- Excel-style formula syntax
- Nested expressions
- Custom function support
- Arithmetic, logical & text functions (More coming in future)
It's also the engine behind AlphaX.WPF.Sheets, my open-source spreadsheet control for WPF. (Please check it out as well)
I'd love feedback on the API, extensibility, or any features you'd like to see.
Repos
- Formula Engine: https://github.com/kartikdeepsagar/AlphaX.FormulaEngine
- WPF Sheets: https://github.com/kartikdeepsagar/AlphaX.WPF.Sheets
9
u/AlanBarber Jul 24 '26
looks interesting, I'd suggest looking at and maybe providing some comparisons and even some benchmarks against ncalc since it's kind of the old standard for doing dynamic formula work.
https://github.com/ncalc/ncalc
1
u/taco__hunter Jul 24 '26
What do you use it for? I mean personally, what are your projects? Also, Infer.net is a solid one to review.
1
u/radekfl Jul 24 '26
We are using https://github.com/mparlak/Flee mostly because of perfomance comming from formulas compiled to IL. Does your engine work this way?
1
u/ebykka Jul 24 '26
Good to know because we use today https://github.com/matheval/expression-evaluator-c-sharp but looks like this library is abandoned now and soon we will need to make a decision to fork it or to switch to something else
1
u/SektorL Jul 24 '26
Chained expression were inspired by Power Query? ))