参数无效:id为' var doc = SpreadsheetApp.openById(SCRIPT_PROP.getProperty(" key")); '

时间:2018-01-19 21:00:58

标签: google-apps-script google-sheets

先谢谢每一个人,我为Google电子表格创建了一个新项目,并将代码从之前项目代码文件复制到新项目的脚本文件中,该文件在旧项目中运行良好。我只是更改了函数名称。但是当我试图运行新的脚本文件时。我收到以下错误。

"Invalid argument: id (line 38, file "Code1") Dismiss"

代码:

var SCRIPT_PROP = PropertiesService.getScriptProperties(); 

function doGet(e) { 
   return addUser4(e.parameter['userIDG'],e.parameter['userNameG']) } 

 function addUser4( userIDG, userNameG) { 
 ///following is line 38, the error 
 //code line, it works in the old project script file 
  var doc = SpreadsheetApp.openById(SCRIPT_PROP.getProperty("key")); }

0 个答案:

没有答案