'Declaration
Public ReadOnly Property CalcEngine As ExcelCalcEngine
public ExcelCalcEngine CalcEngine {get;}
'Declaration
Public ReadOnly Property CalcEngine As ExcelCalcEngine
public ExcelCalcEngine CalcEngine {get;}
flexSheet.CalcEngine.RegisterFunction("GREATEST", 1, (expressions) => { CellRangeReference rangeReference = (expressions[0] as XObjectExpression).Value as CellRangeReference; if (rangeReference != null) { var enumerator = rangeReference.GetEnumerator(); double greatest = double.MinValue; while (enumerator.MoveNext()) { double? v = (enumerator.Current as double?); if (v.HasValue) greatest = Math.Max(greatest, v.Value); } return greatest; } return null; });