以下是给我一个Macro missing argument error
,我似乎无法理解为什么。如果这些行中的其他三列满足三个标准,我正在尝试获取可变长度行集的一列的平均值。想法?
function respondToSubmit(e) {
var ss = SpreadsheetApp.openById("spreadsheetkey");
var ss1= ss.getSheetByName('AllLive');
var app = UiApp.getActiveApplication();
var year = app.getElementById('year');
var selectedyear = e.parameter.year;
var quarterlist = app.getElementById('quarterlist');
var selectedquarter = e.parameter.quarterlist;
var data = ss1.getDataRange().getValues();
for(nn=1;nn<data.length;++nn){
var sheetyear = data[nn][12];
var sheetquarter = data[nn][13];
var lengthofimp = data[nn][10];
var live = data[nn][9];
if (selectedyear == sheetyear && selectedquarter == sheetquarter && live =="LIVE"){
var avlenghthimp = lengthofimp;
var answer = app.createLabel(avlenghthimp);
app.add(answer);
return app;
}
}
}