如何获取脚本以使用手机和平板电脑 [英] How to get scripts to work with phones and tablets

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

问题描述

我正在为使用onEdit函数编辑单元格时运行的Google文档电子表格编写脚本。



到目前为止,它执行的功能超出了电子表格函数可以实现的功能例如:


  • 根据输入的位置验证所有数据
  • 提供保护单元格的机制那些不应该被修改的数据

  • 输入日志日期和时间数据(用户部分无法正常工作)
  • 检查重复条目并相应地发出警告

  • 应用数字格式(超出菜单提供的有限选项)

  • 应用条件格式(无限制! >
  • 以及更多



然而,我发现一个问题是,当从移动浏览器根据维基百科:

$ b从iPhone或andriod平板电脑,脚本不起作用? $ b

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

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