There's some big changes here. It's best to first look at all of the added test cases in TestFormulaParser to get an overview of the work. (The new tests can be merged in first, to observe POI's current behaviour with Added support for parsing of '%' in formulas. Fixed operator precedence (and confirmed associativity): (), %, ^, * /, + -, &, = <> > >= < <= Simplified missing arg parse logic and confirmed with test Added support for error literals (like #REF!) in formulas. Fixed parsing of string literals Simplified logic of rendering IF() and external functions Started support for evaluation of external functions. Made FormulaParser detect when the input string has not been consumed. Removed all occurrences appending a semicolon to the formula before parsing (that code made no difference before). Performed major refactorings inside FormulaParser to fix all of this. Added class FormulaParser.FormulaParseException to help distinguish specific parsing errors from internal POI errors.
Created attachment 21598 [details] svn diff of 10 changed files
Created attachment 21599 [details] tar bzip of 3 added files
Applied to svn trunk, thanks