lock cells in import/export?

I want to implement a functionality where user I can upload a spreadsheet make changes to it and import it. In my spreadsheet few columns are locked and I want to restrict user to unlock those columns once he download the spreadsheet. Is there a way to do it?



  • edited August 2019

    Hey @priyatama, unfortunately, I don't think this is possible, at least if you are talking about the cell locking implemented in i.e. Excel, since the library we are using (sheet.js) doesn't support such a feature (at least the non-PRO version - https://github.com/SheetJS/js-xlsx/issues/804), hence why it's not really something that is possible at the moment.

    If you are talking about the cell locking implemented in our spreadsheet widget, then there are a few difficulties here still. The cell locking implemented in the spreadsheet component of Webix is not the same as locking the cells in say Excel. If you choose to lock any cells, then the data object will have a property containing the coordinates of the locked cells. This is only accessible if you serialize the provided data. The only issue here is exporting that data in some way (the locked fields seem to get lost on export, even after explicitly stating the property). So in theory, if you can get it, you can manually apply the lockCell using these coordinates. Even then, I'm not a 100% this would work still.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion