以下代码执行预期的操作。我收到一个弹出错误:遇到错误:找不到方法偏移量(。
function respondToSubmit(e) {
var app = UiApp.getActiveApplication();
var ss = SpreadsheetApp.openById("0AmDozcwoS3_udGVqaUdfTTRnYlVybmtydklpMkN0Mnc");
var sheets = ss.getSheets();
var tB3 = e.parameter.TextBox3;
var cache = sheetCache(sheets[2].getRange("a1"));
var values = cache.getValuesOfRange(sheets[2].getRange(22,37,113,36));
var rowValue;
for(var j = 0; j < values.length; ++j) {
if (values[j][0] == tB3 ) {
rowValue = j;
break;
}
}
Logger.log(rowValue)
var cD = sheets[2].getRange(22,3);
var tB1 = e.parameter.TextBox1;
var tB2 = e.parameter.TextBox2;
var lB1 = e.parameter.ListBox2;
cD.offset(rowValue, 4).setValue(parseFloat(tB1));
cD.offset(rowValue, 9).setValue(parseFloat(tB2));
((tB1 == 0) && (tB2 == 0)) ? cD.offset(rowValue, 0).setValue("") : cD.offset(rowValue, 0).setValue(tB3);
((tB1 == 0) && (tB2 == 0)) ? cD.offset(rowValue, 1).setValue("") : cD.offset(rowValue, 1).setValue(lB1);
var app = UiApp.getActiveApplication();
app.close();
return app;
}
任何建议将不胜感激!