简体   繁体   English

如何使用谷歌应用程序脚本将谷歌表单附加到谷歌电子表格?

[英]How to attach google form to google spreadsheet using google apps script?

我正在尝试使用脚本将谷歌表单附加到谷歌电子表格,我浏览了电子表格文档,我发现了一个getFormUrl()函数但没有setFormUrl() ,如果有人能帮助我,我会非常感激。

That's what I did:这就是我所做的:

  • I created Google Form,我创建了谷歌表单,
  • then added some scripts in it, to do stuff,然后在里面添加了一些脚本,做一些事情,
  • and finally form returned responses == spreadsheet with answers from this form.最后形成返回的响应 == 电子表格,其中包含来自此表单的答案。

Not sure if that's what you are looking for, but if so, tell me, I'll give you more details.不确定这是否是您要查找的内容,但如果是,请告诉我,我会为您提供更多详细信息。

I went through the Google Form documentation and i found this :我浏览了谷歌表单文档,我发现了这个:

// Open a form by ID and create a new spreadsheet.
 var form = FormApp.openById('1234567890abcdefghijklmnopqrstuvwxyz');
 var ss = SpreadsheetApp.create('Spreadsheet Name');

 // Update the form's response destination.
 form.setDestination(FormApp.DestinationType.SPREADSHEET, ss.getId());

Works fine for me.对我来说很好用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 应用程序脚本:xls以gmail格式附加到Google电子表格 - apps script : xls attach in gmail to google spreadsheet 将Google表单附加到Google电子表格 - Attach a google form to a google spreadsheet 如何使用Google Apps脚本自动下载Google电子表格数据 - how to automatically download Google spreadsheet data using Google Apps script Google Spreadsheet:如何使用Google Apps脚本命名范围 - Google Spreadsheet: How to name a range using Google Apps Script 如何使用 Google Apps 脚本获取最近从 Google 表单中获取的电子表格值 - How To Get Spreadsheet Values which was recently summited from Google form Using Google Apps Script Google Apps Script - 使用侧边栏表单向电子表格追加一行 - Google Apps Script - Using Sidebar form to append a row to spreadsheet 如何使用谷歌应用脚本将一行从一个谷歌电子表格复制到另一个谷歌电子表格? - How to copy a row from one google spreadsheet to another google spreadsheet using google apps script? 如何使用Google Apps脚本(Google表格)打开未转换的Google电子表格 - How to open an unconverted google spreadsheet with google apps script (google sheets) 从绑定到同一Google Spreadsheet的Apps脚本访问Google Form - Accessing Google Form from Apps Script tied to the same Google Spreadsheet 使用Apps脚本将图片上传到Google电子表格 - Uploading images to a Google Spreadsheet using Apps Script
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM