不要被冒犯,但我认为这个论坛不是一个可以免费获取应用程序的市场,它应该为试图自己获得结果的人们带来答案。
也就是说,这是一个“骨架”,应该让你走上正确的轨道,我试图用评论解释发生了什么。(没有测试,可能需要调试)
function copy2(){
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sh = SpreadsheetApp.setActiveSheet(ss.getSheets()[0]); selects the first sheet in your spreadsheet
var data=sh.getDataRange().getValues();// data is a 2D array, index0 = col A
// so column k is index 10
var target=new Array();// this is a new array to collect data
for(n=0;n<data.length;++n){ // iterate in the array, row by row
if (data[n][10]=="Done In The Past 30 Days"){ ;// if condition is true copy the whole row to target
taget.push(data[n]);// copy the whole row
}
}
if(target.length>0){// if there is something to copy
var sh2=SpreadsheetApp.setActiveSheet(ss.getSheets()[1]); //second sheet of your spreadsheet
sh2.getRange(1,1,target.length,target[0].length).setValues();// paste the selected values in the 2cond sheet in one batch write
}
}