[英]I can't hide the last column of a google sheet using google apps scripts
so I have this sheet that I need to modify using a script as I am producing a large number of sheets and can't do everyone manually:所以我有一张需要使用脚本修改的工作表,因为我正在制作大量工作表并且不能手动完成每个人:
now this is the code that I am using that is supposed to hide the last column "AA" from the sheet beside some other things:现在这是我正在使用的代码,它应该在其他一些东西旁边隐藏工作表中的最后一列“AA”:
every line is working as expected except the line where I try to hide column AA is producing this error and I've already tried a lot of variations to this line all resulting to this error: "Exception: Those columns are out of bounds."每一行都按预期工作,除了我试图隐藏 AA 列的那一行产生了这个错误,我已经尝试了很多对这一行的变体,所有这些都导致了这个错误:“异常:那些列超出范围。” so any help would be appreciated, thank you.
所以任何帮助将不胜感激,谢谢。
as specified by https://stackoverflow.com/users/14265469/yuri-khristich , using SpreadsheetApp.flush() before attempting to hide the last column in the sheet worked.按照https://stackoverflow.com/users/14265469/yuri-khristich的规定,在尝试隐藏工作表中的最后一列之前使用 SpreadsheetApp.flush() 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.