GAS填写并提交谷歌表格

时间:2015-03-11 10:59:52

标签: google-apps-script google-form

我需要一个谷歌表单才能将新数据加载到谷歌电子表格中(不太难)。

我需要用户验证电子表格中已有的旧数据。

我的想法是使用旧数据电子表格填写Google表单并填充Google表单的电子表格。

我找到了Mogsdad对Kite's question的回答,并尝试了这个例子......

它似乎可以在执行日志中看到:

[15-03-11 11:53:09:468 CET] Avvio dell'esecuzione
[15-03-11 11:53:09:853 CET] UrlFetchApp.fetch([https://docs.google.com/a/xxx.xxx.xxx/forms/d/1_Xvokasdfq1AtMJEEgIw-NKPVY9oEqorEY9-yGi-lvtTY/formResponse, {payload={entry.1075692923=Rossi, entry.1034411028=Mario}, method=post}]) [0,366 secondi]
[15-03-11 11:53:09:854 CET] HTTPResponse.getResponseCode() [0 secondi]
[15-03-11 11:53:09:855 CET] Esecuzione riuscita [0.369 secondi di esecuzione totale]

http响应为200:成功:

Logger.log(" getResponseCode:" + response.getResponseCode()); - > 15-03-11 13:26:30:884 CET] getResponseCode:200。

但不会在电子表格中添加任何行!

怎么了?

谢谢,Marco

1 个答案:

答案 0 :(得分:0)

找到了线索!!

感谢user1989对Brian Frederickson's Question ...

的评论

Google表单需要公开!!因为UrlFetchApp没有通过任何身份验证!

现在,我可以从输入电子表格中读取数据,通过谷歌表单填写输出电子表格,让用户通过谷歌表格编辑单行!