GcSpread.Sheets Namespace > Spread type : addCustomFunction Method |
var instance = new GcSpread.Sheets.Spread(host, options); var value; // Type: any value = instance.addCustomFunction(fn);
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);