Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
These protection settings restrict or allow users to:
Aspose.Cells supports all the advanced protection settings offered by Excel XP or later versions.
To view the protection settings available in Excel XP:
To view the protection settings available in Excel 2016:
Following the steps mentioned above will show a dialog where you can allow or restrict worksheet features or apply a password to the worksheet.
Aspose.Cells supports all of the advanced protection settings.
Aspose.Cells provides a class, Workbook, that represents a Microsoft Excel file. The Workbook class contains a Worksheets collection that allows access to each worksheet in the Excel file. A worksheet is represented by the Worksheet class.
The Worksheet class provides the Protection property that is used to apply these advanced protection settings. The Protection property is, in fact, an object of the Protection class that encapsulates several Boolean properties for disabling or enabling restrictions.
Below is a small example application. It opens an Excel file and uses most of the advanced protection settings supported by Excel XP and later versions.
If you want to restrict users from editing cells, the cells must be locked before any protection settings are applied. Otherwise, the cells can be edited even if the worksheet is protected. In Microsoft Excel XP, cells can be locked through the following dialog:
| Dialog to lock cells in Excel XP |
|---|
![]() |
It is possible to lock cells using the Aspose.Cells API too. Each cell can have a Style formatting that contains a Boolean property, IsLocked. Set the IsLocked property to true or false to lock or unlock the cell.
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.