EPPlus icon indicating copy to clipboard operation
EPPlus copied to clipboard

Feature request: Detect if a cell ist still to be calculated on manual calculation mode

Open jochenwezel opened this issue 5 years ago • 1 comments
trafficstars

After deactivating automatic calculcation and after inserting/replacing some cell formulas and in the end of larger bulk changes, I sometimes need to know if a cell finally requires recalculation.

For this, I implemented method HasMissingCachedCalculatedFormulaValue as following:

ExcelRangeBase.cs

        public bool HasMissingCachedCalculatedFormulaValue()
        {
            return HasMissingCachedCalculatedFormulaValue(this, _fromRow, _fromCol);
        }

        public static bool HasMissingCachedCalculatedFormulaValue(ExcelRangeBase range, int row, int col)
        {
            if (!string.IsNullOrEmpty(range._worksheet.GetFormula(row, col)))
                return (range._worksheet.GetValueInner(row, col) == null);
            else
                return false;
        }

Would be nice to find this or similar functionality in one of your next releases :-)

jochenwezel avatar May 20 '20 08:05 jochenwezel

Hi Jochen, we will have a look at this.

/Mats

swmal avatar May 25 '20 20:05 swmal

Checking for null values will not tell if a cell is dirty. Better management of dirty cells from a calculation perspective will be considered in a future version.

JanKallman avatar Feb 20 '24 12:02 JanKallman