The ECMA spec uses the following three attributes to generate a password hash for sheet protection:

18.3.1.85    sheetProtection (Sheet Protection Options)

algorithmName

(defaults to SHA-1)

saltValue

Specifies the salt which was prepended to the user-supplied password before it was hashed using the hashing algorithm defined by the preceding attribute values to generate the hashValue attribute, and which shall also be prepended to the user-supplied password before attempting to generate a hash value for comparison.

spinCount

Specifies the number of times the hashing function shall be iteratively run (runs using each iteration's result plus a 4 byte value (0-based, little endian) containing the number of the iteration as the input for the next iteration) when attempting to compare a user- supplied password with the value stored in the hashValue attribute.

hashValue

Those attributes, in addition to the user supplied password are used to generated the hash value used for comparison when disabling sheet protection.

However after a frustrating day of implementing this and watching excel happily tell us that we must have the caps lock key enabled as the password entered is certainly not what is stored in the document we ended up going with  Daniel Rentz'  fairly old writeup here: http://www.openoffice.org/sc/excelfileformat.pdf.

(Un?)Fortunately that actually seems to work - but it is a FAR cry from what is actually documented

Wondering if anyone has been able to implement the specification, and actually get it to work with a modern (2007 and up) version MS Excel?