get active spreadsheet and sheet data code example
Example: get active spreadsheet and sheet data
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet_1 = ss.getSheets()[0];
var sheet_2 = ss.getSheets()[1];
var sheet_1_data = sheet_1.getDataRange().getValues();
var sheet_2_data = sheet_2.getDataRange().getValues();