Last active
October 6, 2019 07:14
-
-
Save oshliaer/658c7554b81838eab90f7d937052715b to your computer and use it in GitHub Desktop.
Копирование правил условного форматирования
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Прмиер для вложенного в Таблицу проекта | |
| function copyRules() { | |
| var sheets = SpreadsheetApp.getActive().getSheets(); | |
| // Набор диапазонов, к которым необходимо применить правила | |
| var ranges = []; | |
| // Набор правил | |
| var rules = []; | |
| ranges.push(sheets[1].getDataRange()); | |
| rules.push(sheets[0].getConditionalFormatRules()[0].copy().setRanges(ranges).build()); | |
| sheets[1].setConditionalFormatRules(rules); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment