简体   繁体   English

如何将我的应用程序脚本部署到我的谷歌表格中

[英]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.

相关问题 如何在我的Google Apps脚本/ Google表格HTML中包含脚本? - How do I include scripts in my Google Apps Script/Google Sheets HTML? 如何使用 Apps 脚本从 Google 表格中的表格末尾获取 5 行? - How do I get 5 rows from the end of my sheet in Google Sheets using Apps Script? 如何在电子表格文件中的所有工作表上运行 Google Apps 脚本? - How do I run a Google Apps script on all sheets in my spreadsheet file? Google 表格:如何在应用程序脚本中连接字符串? - Google sheets: How do I concat a string in apps script? 如何从表格中计算谷歌应用脚​​本中的持续时间? - How do I calculate duration in google apps script from sheets? Google表格脚本编写,如何防止Googel表格中的时间戳自动更新或取消显示? - Google sheets script writing, how do I prevent an auto update or recacluation of my timestamps in googel sheets? 如何在我的 Google Forms 中添加我的 Google Apps 脚本签名代码 - How do I add my Google Apps Script signature code within my Google Forms Google Apps脚本-将事件从Google表格导出到Google日历-如何阻止它删除电子表格公式? - Google Apps Script - Exporting events from Google Sheets to Google Calendar - how can I stop it from removing my spreadsheet formulas? Google Script:如何将控制台中的输出粘贴到 Google 表格中? - Google Script: How do I get my output in the console pasted in google sheets? 使用谷歌应用脚​​本修复我在谷歌表格中的#ERROR - fixing my #ERROR in google sheets with google apps script
 
粤ICP备18138465号  © 2020-2025 STACKOOM.COM