有没有人有这方面的经验,
function clear1() {
var sheet = SpreadsheetApp.getActive().getSheetByName('Sheet1');
var rangesToClear = ['A:C'];
for (var i=0; i<rangesToClear.length; i++) {
sheet.getRange(rangesToClear[i]).clearContent();
}
var testdatastacker = "Source1";
var destination = "Source2";
var ss = SpreadsheetApp.openById(testdatastacker);
var ssdest = SpreadsheetApp.openById(destination);
var ssSheet = ss.getSheetByName('MasterData');
var desSheet = ssdest.getSheetByName('Sheet1');
var ssData = ssSheet.getRange(["A1:C7000"]).getValues();
desSheet.getRange(1, 1, ssData.length, ssData[0].length).setValues(ssData);
}
当我尝试粘贴一系列A1:C6668时没有问题,但是当我在单元格6666&gt;上面粘贴一个范围时= 6666以下的单元格将返回空白而单元格6666&gt; =将粘贴一个值。