Answer the question
In order to leave comments, you need to log in
Google Apps Script how to select only google spreadsheets?
It is necessary that the script takes all the Google tables that are on Google Drive (of which it takes: title, date of creation, author, link).
Now there are two problems:
function fileInf() {
currentSheet = SpreadsheetApp.getActiveSheet();
var files = DriveApp.getFiles();
i = 1;
for (i = 1; i <= 1000; i++) {
files.hasNext();
var file = files.next();
currentSheet.getRange("A" + i).setValue(file.getName());
currentSheet.getRange("B" + i).setValue(file.getDateCreated());
currentSheet.getRange("C" + i).setValue(file.getOwner());
currentSheet.getRange("D" + i).setValue(file.getUrl());
}
}
Answer the question
In order to leave comments, you need to log in
Perhaps the following selection for files will suit you better
var files = DriveApp.searchFiles('mimeType="application/vnd.google-apps.spreadsheet"');
DriveUser
. This is a system object, so you need to use one of its methods to get the information. For example,...
file.getOwner().getEmail()
...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question