google apps script - Error msg from custom function when trying to open another spreadsheet. "You do not have permission to perform that action." -
i have custom function want use retrieve cell value in sheet spreadsheet. 2 parameters of function row
, col
, determine cell reference. whenever try use function, error "you not have permission perform action."
, pointing line openbyid method. here custom function:
function test(row,col) { var formdataspreadsheet = spreadsheetapp.openbyid(form_data_spreadsheet_id); spreadsheetapp.setactivespreadsheet(formdataspreadsheet); var formdatasheet = formdataspreadsheet.getsheetbyname(website_form_data_sheet_name); formdataspreadsheet.setactivesheet(formdatasheet); return formdataspreadsheet }
do need publish form_data_spreadsheet? appreciated.
sorry, can't in custom function:
quote google documentation:
if custom function throws error message "you not have permission call x service.", service requires user authorization , cannot used in custom function.
Comments
Post a Comment