Locked style

Posted by: khauam.cardoso on 20 March 2025, 1:31 pm EST

  • Posted 20 March 2025, 1:31 pm EST

    Hello, is there any way I can lock some cells and apply a font color that is unique to the locked cells, but when I unlock it, it goes back to the original font color?

  • Posted 21 March 2025, 12:30 am EST - Updated 21 March 2025, 12:35 am EST

    Hi,

    It is possible to apply a unique font color (style) to the locked cells in SpreadJS. However, there is no direct way to accomplish this, and it requires adding custom functions and conditional formatting to SpreadJS.

    Please refer to the attached sample that works according to the below algorithm:

    • Add a custom function that returns whether the current cell is locked or not.
    • Add a function-based conditional rule that applies the unique style to the locked cells.

    Refer to the attached GIF and sample.

    Gif:

    Sample: ConditionalLock.zip

    Best Regards,

Need extra support?

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

Learn More

Forum Channels