If语句语法

时间:2018-07-09 15:51:07

标签: javascript if-statement google-apps-script

在此脚本中,变量bankid的计算结果为B1,但我无法将其作为条件,但会得到“ if语句未定义”

    function BankTemplate() {
    //copy  all Bs!;
    var 
    bp=SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Bs").activate();
    var bankid = bp.getSheetValues(3, 6, 1, 1); 
    If(bankid == "B1")
    {
      var 

 bp=SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Bs").activate();
      var arraytocopy =  bp.getSheetValues(1, 1, 60, 20);
      var arrayNew  =  bp.getRange(65, 1, 60, 20).setValues(arraytocopy);
    }

0 个答案:

没有答案