使用 Apps 脚本编辑或更新 Google 表格后,有没有一种方法可以获取数据
Is there a way we can fetch data once Google Sheets is edited or updated using Apps Script
你好,我想在编辑后检查 Google Sheet 数据,并使用 appscript
将数据发送到 phone android 应用程序
您想查看提供的 simple triggers,特别是 onEdit
触发器。
onEdit(e)
runs when a user changes a value in a spreadsheet.
您可以查看 e
事件参数 here 的值。您可能对编辑事件的 oldValue
和 value
字段最感兴趣。在你的脚本中,你会有类似的东西:
function onEdit(event) {
let old = event.oldValue;
let new = event.value;
let message = `value changed from {old} to {new}`
// send message to phone
}
就实际将消息发送到 phone 而言,您可能想打开一个新的单独问题,我认为没有简单或明显的解决方案。向外部服务发送消息的唯一内置方法是通过 gmail、对应用程序可以访问的外部服务器的 http 请求,以及可能将编辑事件转储到应用程序可以访问的另一个 sheet。
你好,我想在编辑后检查 Google Sheet 数据,并使用 appscript
将数据发送到 phone android 应用程序您想查看提供的 simple triggers,特别是 onEdit
触发器。
onEdit(e)
runs when a user changes a value in a spreadsheet.
您可以查看 e
事件参数 here 的值。您可能对编辑事件的 oldValue
和 value
字段最感兴趣。在你的脚本中,你会有类似的东西:
function onEdit(event) {
let old = event.oldValue;
let new = event.value;
let message = `value changed from {old} to {new}`
// send message to phone
}
就实际将消息发送到 phone 而言,您可能想打开一个新的单独问题,我认为没有简单或明显的解决方案。向外部服务发送消息的唯一内置方法是通过 gmail、对应用程序可以访问的外部服务器的 http 请求,以及可能将编辑事件转储到应用程序可以访问的另一个 sheet。