Google Sheets script conditional formatting for whenNumberLessThanOrEqualTo(string)
问题 In Google sheets, I've added some conditional formatting related to various letter codes. Here, A-D are red, E-F are yellow, and G and later are green: This works how I expect and want. In trying to do the same thing via an apps script, this doesn't seem to be supported, because there's stricter type checking than in the UI: SpreadsheetApp.newConditionalFormatRule() .whenNumberLessThanOrEqualTo('D') .setBackground('#ff0000') .setRanges([range]) .build()); This shows the error message: Cannot