natergj / excel4node

Node module to allow for easy Excel file creation
MIT License
1.38k stars 215 forks source link

Sheet Protection #296

Open sumitbhavra opened 5 years ago

sumitbhavra commented 5 years ago

Hi, I want to protect certain columns in excel. example like computed value column which contains a formula. How can I protect it? I am using the workaround. This workaround does not stop the user to delete that particular cell. I have tried sheet protection. However, it locks down everything. Could you please help and guide how to use this sheet protection feature where I can protect certain parts.

ws.addDataValidation({ type: 'textLength', error: 'This cell is locked. You are not allowed', operator: 'equal', allowBlank: false, sqref: range, formulas: [''], });

Cheers Sumit

achieverprince commented 4 years ago

It is not supported as of now. Maybe @natergj can add this enhancement, I believe it is a most wanted feature.