Re:XLParser: A C# parser for Microsoft Excel formulas
by dtech on Sunday September 27, 2015 @07:08AM
(#10286164)
The basics are very simple, but there are some very intricate rules/quirks...
For example, the following are valid formulas:
`=SUM(IF(TRUE,A2,C7):C10)`
`=SUM(A1:B3:C2)`
`=SUM(A1,,,,,,A2)`
`=SUM((A1,A2),A3)` means something different than `=SUM(A1,A2,A3)`, both are valid
`=SUM(A:A 1:1)`
We still have only <<100 production rules while the official Microsoft one has hundreds.
If you don't care about the complicated structures (and our research indicates that they are very rarely used) you can make the grammar a lot simpler.
This might be very useful for a project I have coming up, so I'll definitely look at it further!