Google apps script 谷歌应用程序表单脚本openById,openByUrl不工作
我已经开始学习Google应用程序脚本编写,并且在第一个使用Forms Api的示例中遇到了困难 以下是我的代码:Google apps script 谷歌应用程序表单脚本openById,openByUrl不工作,google-apps-script,Google Apps Script,我已经开始学习Google应用程序脚本编写,并且在第一个使用Forms Api的示例中遇到了困难 以下是我的代码: function testFunction(){ var newClientForm = FormApp.openById('1f-676zsIuVpsQVSr1tAxttTs********'); var clientForm = FormApp.openByUrl('Url of the form in edit mode'); Logger.log('The form
function testFunction(){
var newClientForm = FormApp.openById('1f-676zsIuVpsQVSr1tAxttTs********');
var clientForm = FormApp.openByUrl('Url of the form in edit mode');
Logger.log('The form Title is ', newClientForm.getTitle());
Logger.log('The form Title is ', clientForm.getTitle());
}
无论哪种方式,当我检查日志时,我只得到带有空值的字符串消息
为了检查我的表单id是否正确,我已尝试删除id中的新字符,脚本报告了一个错误。但是,当提到正确的Id时,脚本无法按预期工作
如有任何意见,将不胜感激 我发现了我的错误 问题在于我错误地使用了Logger.log()方法。我应该提到 Logger.log('表单标题为%s',newClientForm.getTitle())
我缺少格式化程序“%s”我发现了我的错误 问题在于我错误地使用了Logger.log()方法。我应该提到 Logger.log('表单标题为%s',newClientForm.getTitle()) 我缺少格式化程序“%s”