1
我正在尝试编写一个脚本来将电子表格列标题转换为表单中的问题。我希望能够在电子表格所在的文件夹中运行此脚本,并让它在相同的文件夹中创建表单。问题是,无论我放置脚本的位置如何,表单都会在根文件夹中创建。我在Form和FormApp文档中找不到任何帮助。我敢肯定它只是一个简单的MOD的函数调用,但是......使用脚本在非根文件夹中创建窗体
function createForm()
{
// Create a new form, then add a checkbox question, a multiple choice question,
// a page break, then a date question and a grid of questions.
var form = FormApp.create('New Form');
var form = FormApp.create('Form Name');
var item = form.addCheckboxItem();
item.setTitle('This is a bunch of gibberish!!!!!!!!!!!!');
item.setChoices([
item.createChoice('Relish')
]);
Logger.log('Published URL: ' + form.getPublishedUrl());
Logger.log('Editor URL: ' + form.getEditUrl());
}