Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/google-apps-script/6.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/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
Google apps script 使用脚本的条件格式设置_Google Apps Script_Google Sheets_Gs Conditional Formatting - Fatal编程技术网

Google apps script 使用脚本的条件格式设置

Google apps script 使用脚本的条件格式设置,google-apps-script,google-sheets,gs-conditional-formatting,Google Apps Script,Google Sheets,Gs Conditional Formatting,例如,如何设置条件格式以使用脚本交替绘制行。 范围A4:09,油漆A4、A6、A8,不使用for循环、DoWhile等。仅在有说明的情况下,这是否可行? 因为逐行运行脚本需要很长的时间和6分钟的时间。不,不循环是不可能的 偏移方法有三种变体: 偏移量 偏移量偏移量,列偏移量,numRows 偏移量偏移量、列偏移量、numRows、numcolumn 它可以返回一个相对于某个范围的范围,但在某个集合迭代中没有用于交替的参数。因此,您仍然需要遍历代码 不使用for循环、DoWhile等,只使用指令,

例如,如何设置条件格式以使用脚本交替绘制行。 范围A4:09,油漆A4、A6、A8,不使用for循环、DoWhile等。仅在有说明的情况下,这是否可行?
因为逐行运行脚本需要很长的时间和6分钟的时间。

不,不循环是不可能的

偏移方法有三种变体:

偏移量 偏移量偏移量,列偏移量,numRows 偏移量偏移量、列偏移量、numRows、numcolumn 它可以返回一个相对于某个范围的范围,但在某个集合迭代中没有用于交替的参数。因此,您仍然需要遍历代码

不使用for循环、DoWhile等,只使用指令,这是可能的吗

是的,不过也不需要脚本。选择要格式化的范围不确定是A4:A9,行4:9,还是一个或多个后续,格式化,条件格式化…,自定义公式为:

并选择所选的格式


或者,你可能会发现交替的颜色。。。格式内的功能足够。

发布一些您尝试过的代码。请在问题中包含您的源代码。请看,并且。正如他所说的,已达到最大时间,他必须使用一个值来执行.setBackground,而不是使用数组来执行.setBackgrounds。。。
=iseven(row())