如果在 Google 表格中满足条件,我正在尝试执行将边框格式添加到行的确切操作,但已接受的答案根本不起作用。原帖说的很清楚了,再贴一次:
Excel中显然有这种类型的条件格式的 内置。
我想通过Google Apps Script在 Google Sheets 中完成相同的操作。以下应证明之前和之后的条件:
示例数据集
Run Code Online (Sandbox Code Playgroud)A B C 1 apple Macintosh 2 apple Granny Smith 3 orange Florida 4 orange Valencia 5 pear Garden 6 banana Chiquita结果示例数据集
Run Code Online (Sandbox Code Playgroud)A B C 1 apple Macintosh 2 apple Granny Smith ----------------------------------- 3 orange Florida 4 orange Valencia ----------------------------------- 5 pear Garden ----------------------------------- 6 banana Chiquita -----------------------------------此问题的脚本/答案应在整行(“A”、“B”和“C”列)下为第 2、4、5 和 6 行显示底部边框。
对该原始帖子的接受答案提供了以下脚本:
function onOpen() {
GroupMyData(); // trigger this …Run Code Online (Sandbox Code Playgroud)