[英]How do I deploy my apps script into my google sheets
I have written a google apps script which sorts 2 columns in a sheet and I want it to always be running when the sheet is updated by a jotform submission.我编写了一个谷歌应用程序脚本,它对工作表中的 2 列进行排序,我希望它在工作表通过 jotform 提交更新时始终运行。 The script works fine when i test it but I've tried to 'deploy' it into the sheet without success.
该脚本在我测试它时工作正常,但我试图将它“部署”到工作表中但没有成功。 I tried to deploy it as a web-app and and add-on but am not sure if they're the correct type of 'deployment'.
我尝试将其部署为网络应用程序和附加组件,但不确定它们是否是正确的“部署”类型。 Is there another step I'm missing to make my script 'go live'?
我还缺少另一个步骤来使我的脚本“上线”吗? Some guidance on this would be appreciated.
对此的一些指导将不胜感激。 Thanks enter image description here
谢谢在此处输入图片描述
I don't fully understand your question but I think you mean you want your function to be called from within a cell?我不完全理解您的问题,但我认为您的意思是您希望从单元格内调用您的 function? An example from Google's documentation is as follows:
Google 文档中的一个示例如下:
#1: Create and name your function: #1:创建并命名您的 function:
function DOUBLE(input) {
return input * 2;
}
#2 Then write the function directly into the cell as you would with =SUM(): #2 然后将 function 直接写入单元格,就像使用 =SUM() 一样:
=DOUBLE(A1)
If this is (and sorry if it isn't) what you're trying to do, then you don't need to deploy the script or anything extra like that.如果这是(如果不是)你正在尝试做的事情,那么你不需要部署脚本或任何类似的东西。 Just save it and it should start to work.
只需保存它,它就应该开始工作了。
Reference: https://developers.google.com/apps-script/guides/sheets/functions参考: https://developers.google.com/apps-script/guides/sheets/functions
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.