Why SheetChange event does not get emitted upon formula evaluation?

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

  • 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
  • Replied 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.
  • Replied 27 December 2021, 8:11 am EST

    Hi Prabhat,

    I do not see sample attached to your reply. Can you please attach?
  • Replied 27 December 2021, 2:33 pm EST

    Here it is
    AccessCellsRowsColumns_csharp_Mod.zip
  • Replied 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
  • Replied 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.
  • Marked as Answer

    Replied 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