Posted 8 September 2017, 3:08 pm EST
we use farpoint spread for winFrom 5.0 in our system, and there is a requirement in our system,we define a lot of custom function that inhert from FuntionInfo, and we override the Evaluate function with declaration like this:
public override object Evaluate(object args)
//get data from database
we set a lot of function in the active sheet cells (for example there are 100 custom function and 20 build in function in the active sheet,the build in funtion such as Sum(A1:B3),the range A1:B3 are filled with custom function) , the active sheet's calculation mode is set to Atuo beacause will want the build in function will recalcuate when we change the custom function, however when I change the custom function or custom function's arguments in a cell, not only the changed function will recalculate,but also all of the custom function will recalcualte,so the performance are unacceptable beacuase many of them are get data from database, is there any way that just recalculate the changing cell's funtion and build in function when we change the funtion in a cell (the other cells with custom function are not going to recalculate),we found another overload of Evaluate function with the declaration like this:
public override object Evaluate(object args,object context)
but the context does not have any valuable information in it,if the context can include infomation describle what cause the Evaluate calling, then we can solve it.