我已经制作了在 id列的帮助下处理详细信息的脚本,这些脚本在两个工作表中都很常见,此代码不会复制任何细节
function myFunction()
{
}
function onOpen() {
var subMenus = [
{name:"Generate farnchise username", functionName: "approveRequests"},
];
SpreadsheetApp.getActiveSpreadsheet().addMenu("Custom Functions", subMenus);
}
function approveRequests() {
var ss = SpreadsheetApp.getActiveSpreadsheet()
sheet = ss.getActiveSheet(),
sheetName = sheet.getName(),
data = sheet.getDataRange().getValues();
if (sheetName == "g6-live-properties") {
var range = sheet.getActiveRange(),
startRow = range.getRowIndex(),
numRows = range.getNumRows(),
numCols = range.getNumColumns()
if (numCols == 3) {
if (data.length > 1) {
var values = range.getValues(),
nextSheet = ss.getSheetByName("11-Apr-60+"),
lastRow = nextSheet.getLastRow();
nextSheet.getRange(lastRow+1,1,numRows,3).setValues(values);
sheet.deleteRows(startRow,numRows);
}
}
}
}