Google Sheets has a great interactive way to declaratively define conditional formatting. Is there a way to program the same declarative model using App Script?
I have a script that generates many spreadsheets. I set data and data validation rules using the Sheet and DataValidation classes. However, I can't seem to do the same for conditional formatting. I expected to find a ConditionalFormattingRule object or something like that.
Note: I know that custom script can be written that listens for an onEdit trigger. However, that script would need to be added to each of the generated spreadsheets. Also, non-declarative rules like that would not appear in the conditional formatting sidebar.
I'm simply trying to apply a red background to cells that have no value.
Is this just not possible?