07.05.2014 Views

The Microsoft Excel File Format - OpenOffice.org

The Microsoft Excel File Format - OpenOffice.org

The Microsoft Excel File Format - OpenOffice.org

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

4 Worksheet/Workbook Stream<br />

4.18 Worksheet/Workbook Protection<br />

An <strong>Excel</strong> document may contain different types of protection.<br />

Definition: Worksheet/workbook protection<br />

Worksheet/workbook protection protects specific contents of the worksheet or workbook, for instance window<br />

settings, cell contents, or objects.<br />

Definition: <strong>File</strong> protection<br />

<strong>File</strong> protection protects the file itself, either sets to read-only, or restricts read and write access. <strong>File</strong> protection<br />

does not care about the contents of the document. This type of protection is described in the next chapter<br />

(➜4.19).<br />

Not all records regarding protection must occur in the stream. If a record is omitted, the corresponding item is not active<br />

(for instance: omitting the OBJECTPROTECT record leaves objects unprotected). For the position of the mentioned<br />

records in the substreams see ➜4.2.<br />

4.18.1 Single Worksheet Protection (BIFF2-BIFF4)<br />

Definition: Worksheet Protection Block<br />

Several records in the Worksheet Protection Block determine the protected items in the sheet.<br />

PROTECT protects the cell contents, WINDOWPROTECT protects the window settings, and OBJECTPROTECT<br />

protects the embedded objects. <strong>The</strong> PASSWORD record contains the hash value of the password (➜4.18.4) used to<br />

protect the sheet. All the mentioned records occur always, if the file was written by <strong>Excel</strong>, but may be omitted.<br />

If a protection password is set in the PASSWORD record, the read/write file protection (➜4.19) will be enabled, which<br />

causes encryption of the file (➜4.19.1) in every case. If this protection is not enabled manually while saving the file, the<br />

built-in password “VelvetSweatshop” is used, not the password set for worksheet protection.<br />

Structure of the Worksheet Protection Block, BIFF2-BIFF4:<br />

○ PROTECT Cell contents: 1 = protected (➜5.82)<br />

○ WINDOWPROTECT Window settings: 1 = protected (➜5.111)<br />

○ OBJECTPROTECT Embedded objects: 1 = protected (➜5.72)<br />

○ PASSWORD Hash value of the password; 0 = No password (➜5.76)<br />

4.18.2 Sheet Protection in a Workbook (BIFF5-BIFF8)<br />

<strong>The</strong> PROTECT record in the Worksheet Protection Block indicates that the sheet is protected. <strong>The</strong>re may follow a<br />

SCENPROTECT record or/and an OBJECTPROTECT record. <strong>The</strong> optional PASSWORD record contains the hash<br />

value of the password used to protect the sheet (➜4.18.4). In BIFF8, there may occur additional records following the<br />

cell records in the Sheet Substream (➜4.2.5).<br />

Sheet protection with password does not cause to switch on read/write file protection. <strong>The</strong>refore the file will not be<br />

encrypted.<br />

Structure of the Worksheet Protection Block, BIFF5-BIFF8:<br />

○ PROTECT Worksheet contents: 1 = protected (➜5.82)<br />

○ OBJECTPROTECT Embedded objects: 1 = protected (➜5.72)<br />

○ SCENPROTECT Scenarios: 1 = protected (➜5.91)<br />

○ PASSWORD Hash value of the password; 0 = no password (➜5.76)<br />

114

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!