Google Form to Google Sheets - 如何将表单数据不断发送到两个不同的独立工作表进行独立编辑(不是镜像)
Google Form to Google Sheets - How to constantly send form data to two different independent sheets for independent editing (Not a mirror)
我有一个 google 表单可以转储到电子表格中。此表单不断收到新的提交。
我需要使用这些数据执行各种不同的功能,在理想情况下,表单会将数据转储到两个地方。这两个地方不会互为镜像,而是独立的数据集,都添加到表单提交中。
这将允许我 delete/edit 一个条目而没有 changing/deleting 另一个条目。
如有指教,将不胜感激(我是新手,苦苦挣扎)。
非常感谢!
这是一个非常简单的方法:
function onFormSubmit(e) {
Logger.log(JSON.stringify(e));//this is worth doing for your own edification
const ss = SpreadsheetApp.getActive();
const sh1 = ss.getSheetByName('Sheet1');
const sh2 = ss.getSheetByName('Sheet2');
sh1.appendRow(e.values);
sh2.appendRow(e.values);
}
You will have to create an installable trigger
我知道您可能会这样做,所以我现在告诉您,您不能在不提供事件对象的情况下从脚本编辑器 运行 此函数。我不记得我写了多少次这个声明。
我有一个 google 表单可以转储到电子表格中。此表单不断收到新的提交。
我需要使用这些数据执行各种不同的功能,在理想情况下,表单会将数据转储到两个地方。这两个地方不会互为镜像,而是独立的数据集,都添加到表单提交中。
这将允许我 delete/edit 一个条目而没有 changing/deleting 另一个条目。
如有指教,将不胜感激(我是新手,苦苦挣扎)。
非常感谢!
这是一个非常简单的方法:
function onFormSubmit(e) {
Logger.log(JSON.stringify(e));//this is worth doing for your own edification
const ss = SpreadsheetApp.getActive();
const sh1 = ss.getSheetByName('Sheet1');
const sh2 = ss.getSheetByName('Sheet2');
sh1.appendRow(e.values);
sh2.appendRow(e.values);
}
You will have to create an installable trigger
我知道您可能会这样做,所以我现在告诉您,您不能在不提供事件对象的情况下从脚本编辑器 运行 此函数。我不记得我写了多少次这个声明。