Summary: | Excel Data table not evaluated | ||
---|---|---|---|
Product: | POI | Reporter: | nirzohar |
Component: | SS Common | Assignee: | POI Developers List <dev> |
Status: | NEEDINFO --- | ||
Severity: | normal | ||
Priority: | P2 | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | All | ||
Bug Depends on: | 57840 | ||
Bug Blocks: | |||
Attachments: |
Excel file with example
Java file example |
Description
nirzohar
2015-08-09 20:43:22 UTC
Currently, the Formula Evaluator only iterates over sheets, rows and cells Any chance you could create a very small test file with a data table in it along with some regular formulas, and a junit test case that tweaks some values in the spreadsheet and table, then does a recalculate, and finally asserts the updated values? That should pass for the sheets, but fail for the data table, but will be a good start for an eventual fix Created attachment 32986 [details]
Excel file with example
Created attachment 32987 [details]
Java file example
The attached excel file contains data table (M4:P52). If you'll change the input 3 for the data table, and run "Recalculate All", you'll see the values in the data tables changes. (Only after click on recalculate all). The same logic in the attached java file. I change the 3rd input (cell C4), and recalculate all cells, but data tables values do not effected. Note, I use private method evaluateAllCells which run over all cells and calculate the formula. I use this method since FormulaEvaluator.evaluateAll() throw an exception. Thanks Thanks for that. However, the test java program doesn't seem to be doing any checks on the data table part, on the main sheet part. Any chance you could add that check in too? The java program (line 42) get the value from M4 cell. This value should be updated after recalculate with data table. To manually simulate this, open the file with excel, change the value in cell C4. Look at the value at M4 (just random cell in the data table), this value in cell M4 will be change only after you'll run "recalculate all". The java app do the same logic. Thanks |