I want to copy everything from the range "Start" to "End" to the top row of another sheet (Sheet2).
Sheet1:
The data between "Start" to "End" can be any number of rows.
This is my current code. It copies everything from Sheet1 to Sheet2 but it can't copy from the specified range, and also doesn't append it to the top row.
function copy() {
var sss = SpreadsheetApp.openById('1-y8PK1al2G0K90t_v6gKmbrM6W4BWpwMLaHa93qjWrs');
var ss = sss.getSheetByName('Sheet1');
//Get full range of data
var SRange = ss.getDataRange();
//get A1 notation identifying the range
var A1Range = SRange.getA1Notation();
//get the data values in range
var SData = SRange.getValues();
var tss = SpreadsheetApp.openById('1-y8PK1al2G0K90t_v6gKmbrM6W4BWpwMLaHa93qjWrs');
var ts = tss.getSheetByName('Sheet2');
//set the target range to the values of the source data
ts.getRange(A1Range).setValues(SData);
}