【发布时间】:2018-01-04 03:07:05
【问题描述】:
我正在尝试在 google 表格中创建一个函数以从 url 链接获取工作簿名称。
function getFileName(id) {
var file = SpreadsheetApp.openByUrl(id)
var fileName = file.getName();
return fileName;
}
我收到消息
“错误 您无权调用 openByUrl"
我试过了
var file = DriveApp.getFileById(id);
我收到相同类型的消息
“找不到具有给定 ID 的项目,或者您无权访问它。”
【问题讨论】:
标签: google-apps-script google-sheets custom-function