I'm having trouble figuring out how to loop the code provided through all spreadsheets in a specific folder. Every attempt I've made at iterating through the folder has resulted in errors, even after trying various methods.
I plan to use a standalone script where I can input the folder's ID number. Any suggestions or ideas would be greatly appreciated. I'm still learning, but making progress. :) Brandon
function dataUpdate() {
var ss = SpreadsheetApp.getActiveSpreadsheet(); // My goal is to iterate through all spreadsheets in a folder rather than using .getactivespreadsheet().
var sheet = ss.getSheets()[0];
var cell = sheet.getRange(2,7);
var sheets = ss.getSheets()[3];
var cell1 = sheets.getRange(7,8);
var cell2 = sheets.getRange(7,9);
cell.setValue('RTI');
sheets.setName("RTI Data");
sheets.getRange(4, 8).setValue('Cell Value');
sheets.getRange(5, 8).setValue('1');
sheets.getRange(6, 8).setValue('2');
sheets.getRange(7, 8).setValue('3');
sheets.getRange(5, 9).setValue('Tier 1');
sheets.getRange(6, 9).setValue('Tier 2');
sheets.getRange(7, 9).setValue('Tier 3');
cell1.setHorizontalAlignment("center").setBackground("#f0f0f0");
cell2.setHorizontalAlignment("center").setBackground("#f0f0f0");
}