TypeError:在对象Spreadsheet中找不到函数getActiveSpreadsheet。 (第155行,文件"代码")

时间:2017-11-28 19:41:29

标签: google-apps-script google-sheets google-sheets-api

我正在努力从三个源表(" src" ||" s")中提取比较单元格并将完整行输出到目标表单中。我附上了我的代码供以下参考。任何帮助将不胜感激谢谢!

function checkRecord() {
  var ss = SpreadsheetApp.openById('sheet id'),
     activesheet = ss.getActiveSpreadsheet(),
     srctrg0 = ss.getSheetByName("sheet name"),
     srctrg1 = ss.getSheetByName("sheet name"),
     srctrg2 = ss.getSheetByName("sheet name"),
     target1 = ss.getSheetByName("sheet name"),    
     s0Range = srctrg0.getDataRange(), 
     s1Range = srctrg1.getDataRange(), 
     s2Range = srctrg2.getDataRange(),
     tRange = target1.getDataRange(),

     stValues0 = s0Range.getValues(),
     s0 = stValues0.length,

     stValues1 = s1Range.getValues(),
     s1 = stValues1.length,

     stValues2 = s2Range.getValues(),
     s2 = stValues2.length,

     tValues = tRange.getValues(),
     t = tValues.length;

      Logger.log(s0);

  for(i = 0; i < stValues0.length; i++){

      if(true)
      {

      }

   }

}

0 个答案:

没有答案