views:

176

answers:

3
  • Should I use a commercial component?
  • Should I roll my own expression evaluator?
  • Should I roll my own dynamic language?

I know programmers are notorious for wanting to write their own language, but this is not the case here. The less work, the better. Lets assume that compatibility with Excel formulas is not a strict requirement; if there's a snappable component that uses formulas that aren't exactly the same as Excel formulas, that's fine.

+1  A: 

If you don't need the grid format you can use .net 3.5 Dynamic Expressions posted here they will allow you to evaluate text as lambda expressions and compile and run. They can serve a purpose, do not need to be used strictly for linq.

If you do need the grid format you can probably still use the dynamic expressions but the grid component is another beast in itself.

Quintin Robinson
+5  A: 

Luca Bolognese has released a .NET library that provides the full set of financial functions from Excel. The main goal for the library is compatibility with Excel, by providing the same functions

http://blogs.msdn.com/lucabol/archive/2008/12/04/financial-functions-for-net-released.aspx

SQLMenace
+1  A: 

Infragistics as much as I hate their suite of controls, has a fully functional C# formula interpreter runtime evaluation engine that works great with their grid controls. Part of their license allows you access to the source code. I was curious how they built it and found they that they used an open source project called Grammatica as their starting point (very cool).

James