How to implement SUM(ABOVE), SUM(LEFT), SUM(RIGHT), SUM(BELOW) with Syncfusion Calculate

Hi,

I investigated and found out Microsoft Word supports formulas in a table such as: SUM(ABOVE), SUM(LEFT), SUM(RIGHT), SUM(BELOW). That is useful, since we don't need to care about the exact column or row in a table. The question is how we can achieve those functions with Syncfusion?

Thanks & regards,
Winter


1 Reply

RC Rajadurai C Syncfusion Team March 9, 2009 11:10 AM UTC

Hi Winter,

Thanks for your interest in Syncfusion products.

In CalcEngine, there is support to add custom function to library. It is a two step process.
1) Add formula to the CalcEngine library

public string MyLibraryFormula(string args)
{
//code
}

This returns computed value as string.

2) Add formula to the formula library
- Call the AddFunction method of engine and add formula name to the library.

this.calcQuick.Engine.AddFunction("MYFUNCTION", new CalcEngine.LibraryFunction(ComputeMYFUNCTION));


Please refer to the following minimal sample that uses custom function with engine of CalcQuick object.
http://files.syncfusion.com/support/samples/Grid.Windows/7.1.0.30/F80011/F80011.zip

Regards,
Rajadurai


Loader.
Up arrow icon