2.4.783 BrtSheetProtection

The BrtSheetProtection record specifies protection options for a Worksheet, Dialog Sheet (section 2.1.7.20), or Macro Sheet (section 2.1.7.32).


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

protpwd

fLocked

...

fObjects

...

fScenarios

...

fFormatCells

...

fFormatColumns

...

fFormatRows

...

fInsertColumns

...

fInsertRows

...

fInsertHyperlinks

...

fDeleteColumns

...

fDeleteRows

...

fSelLockedCells

...

fSort

...

fAutoFilter

...

fPivotTables

...

fSelUnlockedCells

...

protpwd (2 bytes): An unsigned integer that specifies the verifier value of the password required for editing the sheet. If the value is 0x0000, then there is no password. The algorithm to generate the verifier value is documented in Password Verifier Algorithm (section 2.2.9).

fLocked (4 bytes):  A Boolean (section 2.5.98.3) with a meaning that depends on the type of sheet. For a worksheet the value specifies whether the worksheet and the contents of locked cells are protected. For a macro sheet the value specifies whether the macro sheet is protected. For a dialog sheet it is undefined and MUST be ignored.

For worksheets and macro sheets it MUST be a value from the following table:

Value

Meaning

0x00000000

The worksheet and contents of locked cells are not protected.

The macro sheet is not protected.

0x00000001

The worksheet and contents of locked cells are protected.

The macro sheet is protected.

fObjects (4 bytes):  A Boolean with a meaning that depends on the type of sheet. When the sheet is a worksheet or macro sheet and the value of fLocked is 0x00000001, this field specifies whether editing of objects is allowed. Undefined and MUST be ignored if the sheet is a worksheet or macro sheet and fLocked is 0x00000000.

When the sheet is a dialog sheet, this field specifies whether the dialog sheet is protected. The value of fScenarios MUST be the same as the value of this field.

MUST be a value from the following table:

Value

Meaning

0x00000000

Editing of objects is not allowed in the worksheet or macro sheet when the value of fLocked is 0x00000001.

The dialog sheet is protected.

0x00000001

Editing of objects is allowed in the worksheet or macro sheet when the value of fLocked is 0x00000001.

The dialog sheet is not protected.

fScenarios (4 bytes):  A Boolean with a meaning that depends on the type of sheet. When the sheet is a worksheet or macro sheet and the value of fLocked is 0x00000001, this field specifies whether editing of scenarios is allowed. Undefined and MUST be ignored if the sheet is a worksheet or macro sheet and fLocked is 0x00000000.

When the sheet is a dialog sheet, this field specifies whether the dialog sheet is protected. The value of fObjects MUST be the same as the value of this field.

MUST be a value from the following table:

Value

Meaning

0x00000000

Editing of scenarios is not allowed in the worksheet or macro sheet when the value of fLocked is 0x00000001.

The dialog sheet is protected.

0x00000001

Editing of scenarios is allowed in the worksheet or macro sheet when the value of fLocked is 0x00000001.

The dialog sheet is not protected.

fFormatCells (4 bytes):  A Boolean that specifies whether formatting of cells is allowed in the worksheet when the value of fLocked is 0x00000001, and undefined and MUST be ignored when the value of fLocked is 0x00000000. For a macro sheet or dialog sheet, it MUST have a value of 0x00000000 and MUST be ignored. For a worksheet, it MUST have a value from the following table:

Value

Meaning

0x00000000

Formatting of cells is not allowed when the value of fLocked is 0x00000001.

0x00000001

Formatting of cells is allowed when the value of fLocked is 0x00000001.

fFormatColumns (4 bytes):  A Boolean that specifies whether formatting of columns (1) is allowed in the worksheet when the value of fLocked is 0x00000001, and undefined and MUST be ignored when the value of fLocked is 0x00000000. For a macro sheet or dialog sheet, it MUST have a value of 0x00000000 and MUST be ignored. For a worksheet, it MUST have a value from the following table:

Value

Meaning

0x00000000

Formatting of columns (1) is not allowed when the value of fLocked is 0x00000001.

0x00000001

Formatting of columns (1) is allowed when the value of fLocked is 0x00000001.

fFormatRows (4 bytes):  A Boolean that specifies whether formatting of rows is allowed in the worksheet when the value of fLocked is 0x00000001, and undefined and MUST be ignored when the value of fLocked is 0x00000000. For a macro sheet or dialog sheet, it MUST have a value of 0x00000000 and MUST be ignored. For a worksheet, it MUST have a value from the following table:

Value

Meaning

0x00000000

Formatting of rows is not allowed when the value of fLocked is 0x00000001.

0x00000001

Formatting of rows is allowed when the value of fLocked is 0x00000001.

fInsertColumns (4 bytes):  A Boolean that specifies whether insertion of columns (1) is allowed in the worksheet when the value of fLocked is 0x00000001, and undefined and MUST be ignored when the value of fLocked is 0x00000000. For a macro sheet or dialog sheet, it MUST have a value of 0x00000000 and MUST be ignored. For a worksheet, it MUST have a value from the following table:

Value

Meaning

0x00000000

Insertion of columns (1) is not allowed when the value of fLocked is 0x00000001.

0x00000001

Insertion of columns (1) is allowed when the value of fLocked is 0x00000001.

fInsertRows (4 bytes):  A Boolean that specifies whether insertion of rows is allowed in the worksheet when the value of fLocked is 0x00000001, and undefined and MUST be ignored when the value of fLocked is 0x00000000. For a macro sheet or dialog sheet, it MUST have a value of 0x00000000 and MUST be ignored. For a worksheet, it MUST have a value from the following table:

Value

Meaning

0x00000000

Insertion of rows is not allowed when the value of fLocked is 0x00000001.

0x00000001

Insertion of rows is allowed when the value of fLocked is 0x00000001.

fInsertHyperlinks (4 bytes):  A Boolean that specifies whether insertion of hyperlinks is allowed in the worksheet when the value of fLocked is 0x00000001, and undefined and MUST be ignored when the value of fLocked is 0x00000000. For a macro sheet or dialog sheet, it MUST have a value of 0x00000000 and MUST be ignored. For a worksheet, it MUST have a value from the following table:

Value

Meaning

0x00000000

Insertion of hyperlinks is not allowed when the value of fLocked is 0x00000001.

0x00000001

Insertion of hyperlinks is allowed when the value of fLocked is 0x00000001.

fDeleteColumns (4 bytes):  A Boolean that specifies whether deletion of columns (1) is allowed in the worksheet when the value of fLocked is 0x00000001, and undefined and MUST be ignored when the value of fLocked is 0x00000000. For a macro sheet or dialog sheet, it MUST have a value of 0x00000000 and MUST be ignored. For a worksheet, it MUST have a value from the following table:

Value

Meaning

0x00000000

Deletion of columns (1) is not allowed when the value of fLocked is 0x00000001.

0x00000001

Deletion of columns (1) is allowed when the value of fLocked is 0x00000001.

fDeleteRows (4 bytes):  A Boolean that specifies whether deletion of rows is allowed in the worksheet when the value of fLocked is 0x00000001, and undefined and MUST be ignored when the value of fLocked is 0x00000000. For a macro sheet or dialog sheet, it MUST have a value of 0x00000000 and MUST be ignored. For a worksheet, it MUST have a value from the following table:

Value

Meaning

0x00000000

Deletion of rows is not allowed when the value of fLocked is 0x00000001.

0x00000001

Deletion of rows is allowed when the value of fLocked is 0x00000001.

fSelLockedCells (4 bytes):  A Boolean that specifies whether selection of locked cells is allowed in the worksheet when the value of fLocked is 0x00000001, and undefined and MUST be ignored when the value of fLocked is 0x00000000. For a macro sheet or dialog sheet, it MUST have a value of 0x00000001 and MUST be ignored. For a worksheet, it MUST have a value from the following table:

Value

Meaning

0x00000000

Selection of locked cells is not allowed when the value of fLocked is 0x00000001.

0x00000001

Selection of locked cells is allowed when the value of fLocked is 0x00000001.

fSort (4 bytes):  A Boolean that specifies whether sorting is allowed in the worksheet when the value of fLocked is 0x00000001, and undefined and MUST be ignored when the value of fLocked is 0x00000000. For a macro sheet or dialog sheet, it MUST have a value of 0x00000000 and MUST be ignored. For a worksheet, it MUST have a value from the following table:

Value

Meaning

0x00000000

Sorting is not allowed when the value of fLocked is 0x00000001.

0x00000001

Sorting is allowed when the value of fLocked is 0x00000001.

fAutoFilter (4 bytes):  A Boolean that specifies whether use of AutoFilters is allowed in the worksheet when the value of fLocked is 0x00000001, and undefined and MUST be ignored when the value of fLocked is 0x00000000. For a macro sheet or dialog sheet, it MUST have a value of 0x00000000 and MUST be ignored. For a worksheet, it MUST have a value from the following table:

Value

Meaning

0x00000000

Use of AutoFilters is not allowed when the value of fLocked is 0x00000001.

0x00000001

Use of AutoFilters is allowed when the value of fLocked is 0x00000001.

fPivotTables (4 bytes):  A Boolean that specifies whether use of PivotTable (section 2.1.7.40) reports is allowed in the worksheet when the value of fLocked is 0x00000001, and undefined and MUST be ignored when the value of fLocked is 0x00000000. For a macro sheet or dialog sheet, it MUST have a value of 0x00000000 and MUST be ignored. For a worksheet, it MUST have a value from the following table:

Value

Meaning

0x00000000

Use of PivotTable reports is not allowed when the value of fLocked is 0x00000001.

0x00000001

Use of PivotTable reports is allowed when the value of fLocked is 0x00000001.

fSelUnlockedCells (4 bytes):  A Boolean (section 2.5.98.3) that specifies whether selection of unlocked cells is allowed in the worksheet when the value of fLocked is 0x00000001, and undefined and MUST be ignored when the value of fLocked is 0x00000000. For a macro sheet or dialog sheet, it MUST have a value of 0x00000001 and MUST be ignored. For a worksheet, it MUST have a value from the following table:

Value

Meaning

0x00000000

Selection of unlocked cells is not allowed when the value of fLocked is 0x00000001.

0x00000001

Selection of unlocked cells is allowed when the value of fLocked is 0x00000001.