 attached result.xlsx
 attached template.xlsx
 attached testcase.zip
Bug at using nested formulas
Testcase project attached. Look at the formula "City Total" and "Municipality Total". There is 4 nested loops in cells A4, B4, C4, D4. There is values on 4levelloop in cell E4. In the cell E5 there is formula, that calc sum of values in house (4levelloop) In the cell E6 there is formula, that must calc sum of values in city (only one city, 3levelloop), but it's calcs sum of all houses
Comments (7)


 edited description

 changed status to open

 changed status to resolved
fix issue
#8 incorrect formula processing with nested formulas. Introduce FormulaProcessor interface and 2 implementations→ <<cset 1e54855120e0>>

It was required to completely rewrite the formula processing code to resolve this bug.
But the real problem is that the new (correct) formula processing works about 10 times slower than the original one because it has to perform complex analysis of all formula cell transformations.
Because of this I made it possible for a user to choose the formula processing strategy.
There is now a FormulaProcessor interface which has 2 implementations
 FastFormulaProcessor  works in the same way as before but for some particular cases (like the one attached to the ticket) may produce incorrect results
 StandardFormulaProcessor  performs thorough formula analysis and eliminates incorrect results but works about 10 times slower
By default XlsArea uses FastFormulaProcessor because it works fine in the most cases and performs really well.
But if a user has multilevel nested formulas then he can choose to use StandardFormulaProcessor with a single line of code
area.setFormulaProcessor(new StandardFormulaProcessor());
JxlsHelper class now also contains a boolean flag to specify if it should use fast formula processing during area transformations. By default it is set to true.

fix issue
#8 incorrect formula processing with nested formulas. Introduce FormulaProcessor interface and 2 implementations→ <<cset 1e54855120e0>>

Merged in issue
#8(pull request #10)fix issue
#8 incorrect formula processing with nested formulas. Introduce FormulaProcessor interface and 2 implementations→ <<cset 55f873e6b84e>>
 Log in to comment