GAS 填写并提交 google 表格
GAS to fill and submit a google form
我需要一个 google 表单来将新数据加载到 google 电子表格中(不太难)。
我需要用户验证电子表格中已有的旧数据。
我的想法是使用旧数据电子表格来填写 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:successfully:
Logger.log("getResponseCode:" + response.getResponseCode() ); -->15-03-11 13:26:30:884 CET] getResponseCode:200.
但没有向电子表格添加任何行!
怎么了?
谢谢,马可
找到线索了!!
感谢 user1989 对 Brian Frederickson's Question...
的评论
Google表格需要public!!因为 UrlFetchApp 没有通过任何验证!
现在我可以从输入电子表格中读取数据,通过 google 表单填充输出电子表格,并让用户通过 google 表单编辑单行!!!
我需要一个 google 表单来将新数据加载到 google 电子表格中(不太难)。
我需要用户验证电子表格中已有的旧数据。
我的想法是使用旧数据电子表格来填写 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:successfully:
Logger.log("getResponseCode:" + response.getResponseCode() ); -->15-03-11 13:26:30:884 CET] getResponseCode:200.
但没有向电子表格添加任何行!
怎么了?
谢谢,马可
找到线索了!!
感谢 user1989 对 Brian Frederickson's Question...
的评论Google表格需要public!!因为 UrlFetchApp 没有通过任何验证!
现在我可以从输入电子表格中读取数据,通过 google 表单填充输出电子表格,并让用户通过 google 表单编辑单行!!!