Is it possible to get Calling cell information like Cell Object or Row Index and Column Index of Cuntom or User Defined function calling cell in Evaluate Method?
public class Function_Factorial : Infragistics.Silverlight.Excel.CalcEngine.ExcelCalcFunction { public override string Name { get { return "factorial"; } }
protected override ExcelCalcValue Evaluate(ExcelCalcNumberStack numberStack, int argumentCount) { // can we get cell row index and column index here?
return new ExcelCalcValue(this.CalculateFactorial(val)); }
private Int64 CalculateFactorial( Int64 value ) { if ( value == 0 ) return 1;
if ( value < 3 ) return value;
Int64 factorial = 2;
checked { for ( Int64 i = 3; i <= value; i++ ) { factorial *= i; } }
return factorial; } }
I also posted same question on following link in SilverLight Section:
http://forums.infragistics.com/forums/t/36403.aspx
Thanks
There is currently no way to get the calling cell's information. I have forwarded this post to the Developer Support Manager to create a feature request on your behalf.