如何让脚本在手机和平​​板电脑上工作 [英] How to get scripts to work with phones and tablets

查看:33
本文介绍了如何让脚本在手机和平​​板电脑上工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为使用 onEdit 函数编辑单元格时运行的 google docs 电子表格编写脚本.

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:

  • 根据输入位置验证所有数据
  • 提供保护不应被修改的单元格的机制
  • 输入日志日期和时间数据(尽管用户部分无法正常工作)
  • 检查重复条目并发出相应警告
  • 应用数字格式(超出菜单中的有限选项)
  • 应用条件格式(无限制!)
  • 还有更多

然而,我发现一个问题是,当从 iPhone 或安卓平板电脑等移动浏览器编辑单元格时,脚本不起作用?

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?

根据维基百科:

Google Apps Script 是一种基于云的脚本语言,用于在 Google Apps 平台中开发轻量级应用程序.它基于 JavaScript,[2] 但它不是在客户端上运行,而是在 Google Cloud 中执行.

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?

谢谢!

推荐答案

在移动视图中编辑行时,不会触发编辑触发器.单击转到电子表格视图"链接将打开完整的电子表格编辑器,触发器将在其中触发.可能存在技术复杂性,使得触发器在移动视图中工作不切实际,但您可以在 问题跟踪器.

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆