SpreadJS Documentation
Creating Custom Formulas

If you have functions that you use on a regular basis that are not in the built-in functions or if you wish to combine some of the built-in functions into a single function, you can do so by defining your own custom functions. They can be called as you would call any of the built-in functions.

Using Code

This example creates a custom function.

JavaScript
Copy Code
// Add Custom function
// Type =myfunc(1)
// in a cell to see the result
var fn = $.ce.createFunction("myfunc", function() {
 return 100;
}, {minArg:0, maxArg:0});
spread.addCustomFunction(fn);
See Also

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.