尝试打开另一个电子表格时来自自定义函数的错误消息。 "You do not have permission to perform that action."
Error msg from custom function when trying to open another spreadsheet. "You do not have permission to perform that action."
我有一个自定义函数,我想用它从另一个跨页 sheet 中检索 sheet 中的单元格值。该函数的两个参数是 row
和 col
,它们确定要引用的单元格。每当我尝试使用该函数时,我都会收到错误 "You do not have permission to perform that action."
,指向带有 openByID 方法的行。这是我的自定义函数:
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
}
我需要发布 FORM_DATA_SPREADSHEET 吗?非常感谢任何帮助。
抱歉,无法在自定义函数中执行此操作:
引自 Google 文档:
If your custom function throws the error message "You do not have permission to call X service.", the service requires user authorization and thus cannot be used in a custom function.
我有一个自定义函数,我想用它从另一个跨页 sheet 中检索 sheet 中的单元格值。该函数的两个参数是 row
和 col
,它们确定要引用的单元格。每当我尝试使用该函数时,我都会收到错误 "You do not have permission to perform that action."
,指向带有 openByID 方法的行。这是我的自定义函数:
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
}
我需要发布 FORM_DATA_SPREADSHEET 吗?非常感谢任何帮助。
抱歉,无法在自定义函数中执行此操作:
引自 Google 文档:
If your custom function throws the error message "You do not have permission to call X service.", the service requires user authorization and thus cannot be used in a custom function.