SpreadJS Documentation
addCustomFunction Method
The function to add.
Adds a custom function.
Syntax
var instance = new GcSpread.Sheets.Spread(host, options);
var value; // Type: any
value = instance.addCustomFunction(fn);
function addCustomFunction( 
   fn : Function
) : any;

Parameters

fn
The function to add.
Example
This example uses the addCustomFunction method.
sheet.setValue(0,0,"112");
sheet.setValue(1,0,"10");
sheet.setValue(2,0,"223");
sheet.setValue(3,0,"20");
sheet.setValue(4,0,"334");
sheet.setValue(5,0,"30");
sheet.sortRange(0, 0, 6, 1, true, [
                {index:0, ascending:true}
                  ]);
var fn = $.ce.createFunction("myfunc", function() {
              return 100;
             }, {minArg:0, maxArg:0});
spread.addCustomFunction(fn);
See Also

Reference

Spread type
Creating Custom Formulas

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.