Read only configs of flexSheet cells

Posted by: soven on 21 July 2020, 1:10 pm EST

  • Posted 21 July 2020, 1:10 pm EST - Updated 3 October 2022, 3:55 pm EST

    Is there opportunity to make all selected “cells” read Only (selection can be from different columns and rows) ? And how can we configure “readOnly” option to remember it after calling save() or saveAsync() functions, as currently when we save excel file which contains readOnly columns then reopen it, it does not keep readOnly properties?

    I tried to apply workaround using “className” property for cells with “applyCellsStyle()” function, but in this case also after saving the file “className” is gone.

  • Posted 22 July 2020, 5:14 am EST

    Hi Soven,

    If you wish to have some read only cells, then you will need to maintain an array which contains all the cell’s row and column index, which is read-only. Then, you will need to handle the beginningEdit event, check whether the current cell can be edited or not using the read only array and cancel the event accordingly. Please refer to the sample link below for reference:

    https://stackblitz.com/edit/angular-zbevsb

    Unfortunately, this configuration cannot be exported to excel because cells in excel cannot be read-only. The excel has a protection method which can make the cells protected (or read-only) but it cannot be set while exporting the FlexSheet to excel.

    We are sorry for the inconvenience.

    Regards,

    Ashwin

Need extra support?

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

Learn More

Forum Channels