简体   繁体   English

Google Apps脚本错误突然之间?

[英]Google Apps Script Errors all of a sudden?

I am receiving the following error that have started out of the blue. 我收到突然出现的以下错误。 I do not know how to resolve of fix them. 我不知道如何解决这些问题。 These are for Import Range functionality and have been working fine until now... 这些是用于“导入范围”功能的,到目前为止一直运行良好...

Error Spreadsheet X: 错误电子表格X:

TypeError: Cannot call method "getRange" of null. TypeError:无法调用null的方法“ getRange”。 (line 3, file "Code") (第3行,文件“代码”)

Script: 脚本:

var values = SpreadsheetApp.openById('1ka0MPaC1xXcu4EAbmSjc9c7BJyNDwOpggBkix2qMBxY').
getSheetByName('Overtime Activities (Do not edit)').getRange('i3:m1000').getValues();
SpreadsheetApp.getActive().getSheetByName('Form responses 1').
getRange(1,8,values.length,values[0].length).setValues(values);
function timeDriven(e) {
if( e !== undefined )
errorHandling_(monitor_,true);
}

Error Spreadsheet Y: 错误电子表格Y:

TypeError: Cannot call method "getRange" of null. TypeError:无法调用null的方法“ getRange”。 (line 6, file "Code") (第6行,文件“代码”)

Script: 脚本:

var values = SpreadsheetApp.openById('1MJ7D7vOWWPgJBO5MZtZHyPw6Iw0kNlZ8Y5OIwSdzBUg').
getSheetByName('Form responses 1').getRange('a:F').getValues();
SpreadsheetApp.getActive().getSheetByName('Overtime Activities (Do not edit)').
getRange(3,1,values.length,values[0].length).setValues(values);
function timeDriven(e) {
if( e !== undefined )
errorHandling_(monitor_,true);
}

Please help! 请帮忙! :) :)

Extra spacing when renaming sheet threw everything out. 重命名工作表时多余的空格将所有内容都扔掉了。 Thank you Serge for continuing to point this out! 感谢Serge继续指出这一点! Issue fixed. 问题已解决。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Google Map上的突发错误:TypeError:_.x不是函数 - Sudden errors on Google Map: TypeError: _.x is not a function 使用Google Apps脚本检索一个月内的所有事件 - Retrieving all events in a month with Google Apps Script 如何在Google Apps域Apps脚本中获取“所有新用户” - How to get 'All new users' in the Google Apps domain Apps Script Google网站上的Apps脚本小工具开始引发CORS错误 - Apps Script Gadget on Google Site started throwing CORS errors vanilla js和谷歌应用脚本之间的执行有区别吗? 相同的代码在应用程序脚本中呈现错误 - Is there a difference in execution between vanilla js and google apps script? The same code renders errors in apps script 使用Google Apps脚本删除Google表格中的所有过滤器 - Remove all filters in google sheets using google apps script 谷歌表格谷歌应用程序脚本为所有行添加 VLOOKUP 函数 - Google Sheets google apps script add a VLOOKUP function for all rows 使用Google Apps脚本解析XML元素中的所有值? - Parse all values from a XML element using Google Apps Script? 用于 Google Apps 脚本的 DocumentApp 未返回元素的所有属性? - DocumentApp for Google Apps Script not returning all attributes of an element? 如何使用 google Apps 脚本获取 json 阵列上可用的所有列表 - How to get all lists available on a json Array with google Apps script
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM