arg0=arg0||2
arg1=arg1||3
arg2=arg2||4
sum1=arg0+arg1+arg2
return
}
sum(1,2)
console.log(sum1)
自定义函数1. 可以在 Spread.Sheets 中添加自定义函数并在表单中使用它们.
2. 创建自定义函数时需要从 GC.Spread.CalcEngine.Functions.Function派生并重写一些关键方法,下面是示例代码:
3. 当添加完自定义函数后, 如果想移除一个或者所有的自定义函数, 可以使用 removeCustomFunction或者 clearCustomFunctions函数。
sheet.removeCustomFunction('FACTORIAL')
sheet.clearCustomFunctions()