我有这个公式,它成功地列出了我在一个文件夹中的所有文件。惊人的。但是,我也可以在这个脚本中列出每个文件中的一些特定单元格数据吗?
function listFilesInFolder() {
var folder = DocsList.getFolder("1- Summaries");
var contents = folder.getFiles();
var file;
var data;
var sheet = SpreadsheetApp.getActiveSheet();
sheet.clear();
sheet.appendRow(["Name", "Date", "Size", "URL", "Download", "Description", "Type"]);
for (var i = 0; i < contents.length; i++) {
file = contents[i];
if (file.getFileType() == "SPREADSHEET") {
continue;
}
data = [
file.getName(),
file.getDateCreated(),
file.getValue(B10), **(THIS IS WHERE I WOULD LIKE TO GET DATA, but it does not work)**
file.getUrl(),
"https://docs.google.com/a/acme.com/spreadsheet/ccc?key=" + file.getId(),
file.getDescription(),
"audio/mp3"
]
sheet.appendRow(data);