Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Next »

Description

A SheetProtection object contains sheet level protection properties that control what users can interact with when a worksheet is protected.

C#
vb.net

Remarks

In a new workbook, AllowSelectLockedCells and AllowSelectUnlockedCells default to true. The rest of the properties default to false.

The SheetProtection properties will only take effect if the worksheet is protected. Worksheets can be protected with Worksheet.Protect(String). If the worksheet is not protected, the values of the properties will persist, but will not have an effect.

Examples

C#
vb.net

Properties

Name

Description

AllowSelectLockedCells

Sets or returns whether the worksheet will allow users to select locked cells when the worksheet is protected.

AllowSelectUnlockedCells

Sets or returns whether the worksheet will allow users to select unlocked cells when the worksheet is protected.

AllowFormatCells

Sets or returns whether the worksheet will allow users to format cells when the worksheet is protected.
  • No labels