Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/variables/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Variables 表单IF语句的变量未定义google脚本_Variables_If Statement_Google Apps Script_Google Sheets - Fatal编程技术网

Variables 表单IF语句的变量未定义google脚本

Variables 表单IF语句的变量未定义google脚本,variables,if-statement,google-apps-script,google-sheets,Variables,If Statement,Google Apps Script,Google Sheets,给我的错误消息“spreadhseetapp”未定义。我怎样才能解决这个问题 var app = spreadhseetapp; 代码应以区分大小写(如函数名)的格式编写。 检查下面的代码并检查它是否有效 为什么在程序中评论spreadhseetapp我尝试了上面的代码,但它仍然向我显示此错误消息“ReferenceError:“spreadsheetapp”未定义。(第3行,文件“代码”),请在此处共享您的工作表链接。 function myFunction() { //var a

给我的错误消息“spreadhseetapp”未定义。我怎样才能解决这个问题

var app = spreadhseetapp; 

代码应以区分大小写(如函数名)的格式编写。 检查下面的代码并检查它是否有效


为什么在程序中评论spreadhseetapp我尝试了上面的代码,但它仍然向我显示此错误消息“ReferenceError:“spreadsheetapp”未定义。(第3行,文件“代码”),请在此处共享您的工作表链接。
function myFunction() {

  //var app = spreadhseetapp;

  var activesheet = getactivespreadsheet().getactivesheet();

  var workingcell = activesheet.getrange(1, 3).getvalue();

  if(workingcell > 1){

 activesheet.getrange(1, 4).setvalue("Dues Paid");
 }

}
function myFunction() {

  //var app = spreadhseetapp;

  var activesheet = getactivespreadsheet().getactivesheet();

  var workingcell = activesheet.getrange(1, 3).getvalue();

  if(workingcell > 1){

 activesheet.getrange(1, 4).setvalue("Dues Paid");
 }

}
function myFunction() {

  var app = SpreadsheetApp;

  var activesheet = app.getActiveSpreadsheet().getActiveSheet()

  var workingcell = activesheet.getRange(1, 3).getValue();

  if(workingcell > 1){

 activesheet.getRange(1, 4).setValue("Dues Paid");
 }

}