Why SheetChange event does not get emitted upon formula evaluation?

Posted by: alexei.snisarenko on 23 December 2021, 10:43 pm EST

    • Post Options:
    • Link

    Posted 23 December 2021, 10:43 pm EST

    I have formula evaluating a value in Sheet1 and formula depends on cell in Sheet2.

    When I set cell value in Sheet2 I only get notification about the value I set but do not get notification about value change in Sheet1.

    Why?

    https://www.grapecity.com/documents-api-excel/docs/online/GrapeCity.Documents.Excel~GrapeCity.Documents.Excel.Workbook~SheetChange_EV.html?highlight=sheetchange%2C

  • Posted 26 December 2021, 11:09 pm EST

    Hello Alexei,

    We do not face the issue at our end with a stripped-down sample. Please find the attached sample implementing the same.

    If you are doing anything else then please let us know and modify the sample accordingly.

    Regards,

    Prabhat Sharma.

  • Posted 27 December 2021, 8:11 am EST

    Hi Prabhat,

    I do not see sample attached to your reply. Can you please attach?

  • Posted 27 December 2021, 2:33 pm EST

  • Posted 28 December 2021, 11:45 pm EST

    Hi Prabhat,

    I’ve updated your sample to load workbook from disk instead of creating in-memory.

    I used the workbook file created by your sample.

    The modified example reproduces my problem: Workbook_SheetChange does not get called with the changes in Sheet1!A6 (with formula in it).

    AccessCellsRowsColumns_csharp.zip

  • Posted 29 December 2021, 6:50 pm EST

    Hello,

    We too can observe the issue at our end and escalate this to the developers for investigation.

    We will let you know as soon as we get the update on this from the developers’ end.

    [Internal Tracking ID: DOCXLS-5333]

    Regards,

    Prabhat Sharma.

  • Posted 3 January 2022, 7:08 pm EST

    Hello,

    As per the developers, the current behavior is by design, for good performance, we only fire event for cells which value is changed by the user, if you want to know which cells is changed by formulas, you can call IRange.GetDependents() to get the cells.

    Please find the attached sample implementing the same.

    Regards,

    Prabhat Sharma.

    AccessCellsRowsColumns_csharp.zip

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels