我得到它的工作,直到在這兒,它運行從腳本編輯器確定:
function listFiles() {
var baseFolderObject = DriveApp.getFolderById('0B38VWNq67cFHZVdWcE5KREZXS1U');
var results = [];
var types = [MimeType.GOOGLE_SHEETS]; //, MimeType.GOOGLE_DOCS];
for (var t in types) {
var files = baseFolderObject.getFilesByType(types[t]);
var file, data, sheet = SpreadsheetApp.getActiveSheet();
sheet.appendRow(["Name", "Date", "Size", "URL", "Download", "Description", "Type"]);
while (files.hasNext()) {
var file = files.next();
results.push(file);
data = [
file.getName(),
file.getDateCreated(),
file.getSize(),
file.getUrl(),
file.getId()
];
sheet.appendRow(data);
}
}
}
我現在有,如果我想從電子表格中運行的唯一問題,它說:「您沒有權限調用「getFolderById」。