Untitled
unknown
plain_text
2 years ago
744 B
8
Indexable
function getValuesFromSheets() { // Get the active spreadsheet var spreadsheet = SpreadsheetApp.getActiveSpreadsheet(); // Get the sheets by name var sheetA = spreadsheet.getSheetByName("A"); var sheetB = spreadsheet.getSheetByName("B"); // Retrieve values from specific cells in sheets A and B var valueFromSheetA = sheetA.getRange("A1").getValue(); // Change A1 to the cell you want to retrieve from sheet A var valueFromSheetB = sheetB.getRange("B2").getValue(); // Change B2 to the cell you want to retrieve from sheet B // Log the retrieved values (you can do further processing with them) Logger.log("Value from Sheet A: " + valueFromSheetA); Logger.log("Value from Sheet B: " + valueFromSheetB); }
Editor is loading...