I need to copy an array of data from one file to another, it needs to be pasted into the destination sheet from column F:J, while in the source file the data is in columns A:D
function copyRange() {
var source = SpreadsheetApp.openById("xxx");
var ssheet = source.getSheetByName("Source");
var srow = ssheet.getLastRow();
var srange = ssheet.getRange(8, 1, srow, 5).getValues();
var destination = SpreadsheetApp.openById("yyy");
var dsheet = destination.getSheetByName("Destination");
var drange = dsheet.getRange(5, 6, srow, 10);
drange.setValues(srange);}
I keep getting the error "Incorrect range width, was 5 but should be 10" I assume (I'm a total and utter newbie) that this refers to the number of columns in the destination range, but I don't get why that should be 10 when the data in the source range is in 5 columns?