2015-06-18 4 views
0

Я не пишу код с Google FormApp, как мы все знаем, каждая форма имеет назначение лист, я хочу, чтобы открыть SpreadsheetApp по:Не имеет разрешения на работу Листы Google Формы назначения

var destId = FormApp.getActiveForm().getDestinationId(); 
var ss = SpreadsheetApp.openById(destId); 

Но у меня есть предупреждение, что «у вас нет разрешения openById», значит, я не могу открыть таблицу в скрипте FormApp?

Или что-то не так с моим кодом?

P.s. Я пишу код, основанный на «уведомлениях формы от Google».

Спасибо!

+0

проверить этот другой вопрос: http://stackoverflow.com/questions/22664183/google-script-error-you-do-not-have-permission-to- колл-openbyid – Gerardo

ответ

2

удаления кода @OnlyCurrentDoc

/** 
* @OnlyCurrentDoc 
* 
* The above comment directs Apps Script to limit the scope of file 
* access for this add-on. It specifies that this add-on will only 
* attempt to read or modify the files in which the add-on is used, 
* and not all of the user's files. The authorization request message 
* presented to users will reflect this limited scope. 
*/ 
Смежные вопросы