我有以下脚本,我收到错误
SyntaxError: missing ) 在参数列表之后(第 9 行,文件“tracker.gs”)
function tracker() {
var spreadsheetIDs = ["myID1","myID2"];
var i=0,sheet,thisID="";
for (i=0;i<spreadsheetIDs.length;i+=1) {
thisID=spreadsheetIDs[i];
sheet = SpreadsheetApp.openById(thisID).getSheetByName('History');
sheet.getRange("A2").setFormula('=IF(Login!G3=0,"",QUERY(ARRAYFORMULA({IMPORTRANGE(Core!B1,"History!A1:AC4000");IMPORTRANGE(Core!B1,"History!A4001:AC8000");IMPORTRANGE(Core!B1,"History!A8001:AC12000")}),"Select Col1, Col2, Col3, Col4, Col5, Col6, Col7, Col8, Col9, Col10, Col11, Col12, Col13, Col14, Col15, Col16, Col17, Col18, Col19, Col20, Col21, Col22, Col23, Col24, Col25, Col26, Col27, Col28, Col29 where Col2 ='"&Login!C2&"'",0))');
};
};
我已经确定它在'"&Login!C2&"'周围有撇号导致公式末尾出现问题,但这是 QUERY 函数中的一个关键标准。
我该如何解决这个错误?
holdtom
相关分类