Add Protection in Worksheet
Contents
[
Hide
]
Aspose.Cells for GridDesktop allows you to protect cells in a worksheet.First you need to protect your worksheet, then you can protect your desired cells in the worksheet. In order to protect worksheet, please set Worksheet.Protected property to true, then use Worksheet.SetProtected() method to protect the range of cells.
Protect Cell using Aspose.Cells.GridDesktop
The following sample code protects all the cells in range A1:B1 of the active worksheet of GridDesktop. When you will double click any cell in this range, you will not able to edit. It will make these cells readonly.