Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/google-sheets/3.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/elixir/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
Google sheets SpreadsheetApp.setActiveSheet()已停止工作_Google Sheets - Fatal编程技术网

Google sheets SpreadsheetApp.setActiveSheet()已停止工作

Google sheets SpreadsheetApp.setActiveSheet()已停止工作,google-sheets,Google Sheets,我已经使用SpreadsheetApp.setActiveSheet()好几年了,以便在UI中的工作表之间进行可视化切换。从今天起,这就不再起作用了。我无法使用此方法切换到其他工作表。没有我使用的几个脚本和电子表格。 有什么原因吗?或者我可以使用其他方法强制在UI中显示某个工作表吗?这是过去正常工作的方法,但现在不再是了: function ShowCalculation() { var ss = SpreadsheetApp.getActiveSpreadsheet(); Spreadsh

我已经使用SpreadsheetApp.setActiveSheet()好几年了,以便在UI中的工作表之间进行可视化切换。从今天起,这就不再起作用了。我无法使用此方法切换到其他工作表。没有我使用的几个脚本和电子表格。 有什么原因吗?或者我可以使用其他方法强制在UI中显示某个工作表吗?这是过去正常工作的方法,但现在不再是了:

function ShowCalculation() {
 var ss = SpreadsheetApp.getActiveSpreadsheet();
 SpreadsheetApp.setActiveSheet(ss.getSheetByName("Calculation"));
}
已知问题:

在修复之前,您可以尝试以下代码:

function ShowCalculation() {
 var ss = SpreadsheetApp.getActiveSpreadsheet();
 ss.getSheetByName("Calculation").getRange('A1').activate();
}
已知问题:

在修复之前,您可以尝试以下代码:

function ShowCalculation() {
 var ss = SpreadsheetApp.getActiveSpreadsheet();
 ss.getSheetByName("Calculation").getRange('A1').activate();
}

不知怎的,它又起作用了。我的脚本没有改变。这显然是谷歌的问题。

不知何故,它又起作用了。我的脚本没有改变。这显然是谷歌的问题。

谢谢你的回复,基尚。下次我会记住你的答案!但这一切又起作用了。谢谢你的回复,基山。下次我会记住你的答案!但这一切又起作用了。