Library to parse Excel Formulas

2019-08-03 11:17发布

问题:

I'm looking to make an AddIn for excel that modifies formulas in cells. Looking at Microsoft's C# and VBA API, I don't even see a Formula object. All I can get is the string that is displayed. Is there a formula parser for excel so that I can mess with something like an AST graph? (I'm language agnostic)

Thanks.

回答1:

There is not an accessible built-in parser with an API, but several people have written Excel formula parsers (although the Excel team keep moving the goalposts). See
Ewbi's c#
and Rob Van Gelder's VBA