EPPlus
EPPlus copied to clipboard
Feature request: Detect if a cell ist still to be calculated on manual calculation mode
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 :-)
Hi Jochen, we will have a look at this.
/Mats
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.