![](/img/trans.png)
[英]Enable and disable custom google sheet functions using google apps script
[英]using google sheet functions inside google script
我制作了這個谷歌腳本:
function quadrato(input) {
return POW(input,2);
}
我在工作表中輸入了對我的“quadrato”function 的調用,但工作表給了我這個錯誤:
ReferenceError:“POW”非定義。 (里加 2)。
表調用我的腳本 function “quadrato”
相反,“POW”是來自工作表的可參考 function,正如您在此 iimage 中看到的那樣:
實際上,您只需要聲明您的自定義 function :
在 function(){} 前面添加 /**... */ 語句
/**
* Your description about this function.
* @customfunction
* @param {input} the description about this papameter
*/
function quadrato(input) {
return Math.pow(input,2);
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.