We have a multi-sheet workbook used for calculating population growth estimates. Sheet A has a semi-complicated formula which is basically a nested IF(OR()) function with 3 if blocks. The formula references cells in another sheet which are formulas to other columns in a sheet. The value in excel appears to work as expected. But after loading into Excel Worksheet (Infragistics.Documents.Excel.16.2) in memory all the values appear to calculate correctly except the ones referencing across worksheet.
Example: We have a detail sheet and a summary sheet. Summary sheet has the following Formula: =IF(OR(Detail!$A$28, Detail!$A$29), Detail!E$16, IF(Detail!$A$30, Detail!E$17, IF(Detail!$A$31, Detail!E$18, Detail!E$17))) where Detail A28 - A31 are string values like TRUE or FALSE that evaluate to boolean. The other refernced columns E16, E17, E18 etc are functions adding other columns in the Detail sheet which I can inspect and all run correctly. But the function on the Summary Sheet that references the Detail Sheet just return a zero, which isn't possible if it looks at ANY of the other fields.
This problem is new after upgrading from version 9.x to 16.x and I'm sure there have been a lot of changes since then. Any pointers? I am unable to find ANYTHING referencing this sort of issue. I also have not been able to replicate it using test spreadsheets.
Thanks again for the great support! Greatly appreciated.
Hello Jesse,
This issue was fixed in versions 17.1 and 17.2 as well as in any future version of Infragistics for Windows Forms. You can download now the latest service release for these version.Thank you for using Infragistics components.
Thanks so much Milko, this is working on my end. Guess I missed the overloaded constructor on the Recalculate() method. Thank you again.
-Jesse.
Hi Jesse,
Thank you for your reply and sample provided.
I have tested this on my side and was able to reproduce the issue you had described. I have asked our developers to examine this further. To ensure it will receive attention I have logged this behavior in our internal tracking system with a development ID of 244273. This will be assigned to a developer in a future sprint to review my investigation and confirm my findings or to offer a fix, or other resolution.
In the mean time you can fix this by calling Recalculate method of the workbook with first parameter set to TRUE like this:
this.wb.Recalculate(true);
Please let me know if you need more information.
Thanks for the reply and testing. Yes I did the same thing to try to repro this issue, but the steps taken are not exact here.
We load the Estimate2.xlsx into memory;
Then we set some sheets cells to updated values from the database.
Then we read out the formula values from the spreadsheet.
This workflow I can reproduce. If I load the sheet. Read some values, then change values in the woorkbook at runtime.. the referencing columns in the sheet do not seem to update.
I have updated your example. to Load the estimate2.xlsx file at start and read out the "happy path" values. ALL false, null, or 0 at that time.
Clicking the Change Values button simulates the issue i'm running into where I change the value of Detail A31 to true, which should force the D3 Formula to re-evaluate to read the value from E18 with is set to 10. But you can see that this doesn't happen. In fact, none of the formulas seem to re-evalutate on the fly. I have tried to force a workbook recalculate but that does nothing either. I assume this is a change to how/where the calc-engine does its work.