SpreadView Recalculate() Recalculate all sheets

Posted by: olivier.rondeau on 26 August 2019, 7:04 pm EST

    • Post Options:
    • Link

    Posted 26 August 2019, 7:04 pm EST

    Hi,

    I am having a problem with the methods of recalculation on the SheetView class.

    These methods are described as allowing the cells to be reevaluated and customFormules that have changed (or not with recalculateAll) on the sheet since the last recalculation cycle .

    But when I call it after my file opening in a loop on Spread.Sheets, I realize that every sheet of my workbook is reevaluated, even those that are invisible.

    Is there anything I do not understand or is there a problem whith this method?

    
    var fpSpread = new Fpspread();
    fpSpread.OpenExcel(Path);
    // Add a customFormula to debug Evaluate
    // Put this custom formula in the last sheet
    foreach (SheetView sheetView in fpSpread .Sheets)
    {
    	sheet.Recalculate();
    }
    
    

    Thanks for your help.

    Best regards.

  • Posted 28 August 2019, 2:13 am EST

    Hello,

    Just to confirm, do you mean that you have multiple sheets in spread (both visible and invisible) and some cell(s) in invisible sheet refer a cell of visible sheet and invoking the Recalculate method updates the invisible sheet? Do you want the invisible sheets be not updated? If that is the case, you can check the visibility of the sheet through Visible property and accordingly call the Recalculate method.

    However, if this is not what you intended to ask, I would request you to kindly elaborate on your use case and requirement.

    Thanks,

    Ruchir

Need extra support?

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

Learn More

Forum Channels