Hi Rahal Ekanayaka,
Thank you for contacting Syncfusion
support.
We have checked your reported requirement
and it can be achievable in our spreadsheet by using the lockCells method
as like as below.
|
<button id="button1" (click)="setProtection()">set protection</button>
<ejs-spreadsheet #default [openUrl]="openUrl" [saveUrl]="saveUrl">
</ejs-spreadsheet>
setProtection() {
this.spreadsheetObj.protectSheet(0, { selectCells: true});
this.spreadsheetObj.lockCells('A3:C14', false);
}
|
For your convenience, we have prepared the
sample based on our requirement. Please find the link below.
Sample Link: https://stackblitz.com/edit/angular-c62pgw-owbtlr?file=app.component.ts
For more details regarding the
spreadsheet protection, please find the links below.
Documentation Link:
https://ej2.syncfusion.com/angular/documentation/spreadsheet/protect-sheet/#protect-sheet
https://ej2.syncfusion.com/angular/documentation/spreadsheet/protect-sheet/#unlock-the-particular-cells-in-the-protected-sheet
API Link :
https://ej2.syncfusion.com/angular/documentation/api/spreadsheet/#protectsheet
https://ej2.syncfusion.com/angular/documentation/api/spreadsheet/#lockcells
Demo Link: https://ej2.syncfusion.com/angular/demos/#/bootstrap5/spreadsheet/protect-sheet
Could you please check the above details
and get back to us, if you need any further assistance on this.
Regards,
Janakiraman S.