如何获取脚本以使用手机和平板电脑 [英] How to get scripts to work with phones and tablets
问题描述
我正在为使用onEdit函数编辑单元格时运行的Google文档电子表格编写脚本。
到目前为止,它执行的功能超出了电子表格函数可以实现的功能例如:
然而,我发现一个问题是,当从移动浏览器根据维基百科:
$ b从iPhone或andriod平板电脑,脚本不起作用? $ bGoogle Apps脚本是一款基于云的脚本语言,可在Google Apps平台中轻量级开发应用程序。它基于JavaScript [2],但不是在客户端上运行,而是在Google Cloud中执行。
我做错了什么或者是否有另一种方式来设置我的触发器,这样即使有人从移动浏览器输入数据,我的脚本也会运行?
谢谢! / p>
在移动视图中编辑行时,编辑触发器不会被触发。点击链接转到电子表格视图将打开完整的电子表格编辑器,触发器将触发。可能存在技术上的复杂性,使触发器在移动视图中无法正常工作,但您可以在。问题跟踪器
I'm writing scripts for a google docs spreadsheet that run when cells are edited using the onEdit function.
So far it performs things beyond what spreadsheet functions can achieve such as:
- Validates all data based on where they are entered
- Provides mechanism for protecting cells that are not supposed to be modified
- Logs date and time data is entered (the user part doesn't work properly though)
- Checks for duplicate entries and warns accordingly
- Applies number formats (beyond the limited choices available from the menus)
- Applies conditional formatting (No limits!)
- And much much more
However one problem I find is that when cells are edited from mobile browsers such as from an iPhone or andriod tablet, the scripts do not work?
According to wikipedia:
Google Apps Script is a cloud based scripting language for light-weight application development in the Google Apps platform. It is based on JavaScript,[2] however instead of running on the client, it gets executed in the Google Cloud.
Is there something I am doing wrong or is there another way to set up my triggers so that my scripts will be run even when someone enters data from a mobile browser?
Thanks!
On edit triggers aren't fired when a row is edited in the mobile view. Clicking the link "Go to spreadsheet view" will open the full spreadsheet editor, where triggers will fire. There may be technical complications that make it impractical to have triggers work in the mobile view, but you can create feature request for it on the issue tracker.
这篇关于如何获取脚本以使用手机和平板电脑的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!