Conditional formats error

Posted by: sachot on 10 August 2020, 11:36 pm EST

  • Posted 10 August 2020, 11:36 pm EST


    When i add a conditional format based on formula, i get an error when i try to get the rules list.
    But no problem with text rule.

    Is it a bug or i do something wrong ?


  • Marked as Answer

    Replied 12 August 2020, 12:41 am EST

    Hi Christophe,

    To get a JSON string representation of conditional rules, you need to use the following code:
    var formatsJSON = sheet.conditionalFormats.toJSON();
    var stringifiedRules = JSON.stringify(formatsJSON && formatsJSON.rules);

  • Replied 30 August 2020, 10:09 pm EST

    It works.

    Thanks !
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels