[Table of Contents] [docx version]
SpreadsheetML Reference Material - Table of Contents
This element tracks file sharing File sharing settings for the workbook.
Parent Elements |
workbook (§3.2.27) |
Attributes |
Description |
readOnlyRecommended (Read Only Recommended) |
Specifies a boolean value that indicates on open, whether the application alerts the user that the file be marked as read-only.
The possible values for this attribute are defined by the XML Schema boolean datatype. |
reservationPassword (Write Reservation Password) |
Specifies the hash of the password required for editing this workbook. This hash is optional and may be ignored. The hash is generated from an 8-bit wide character. 16-bit Unicode characters must be converted down to 8 bits before the hash is computed, using the logic defined in the revisionsPassword attribute of §3.2.29.
The resulting value is hashed using the algorithm defined below.
[Note: An example algorithm to hash the user input into the value stored is as follows:
// Function Input: // szPassword: NULL terminated C-Style string // cchPassword: The number of characters in szPassword (not including the NULL terminator) WORD GetPasswordHash(const CHAR *szPassword, int cchPassword) { WORD wPasswordHash; const CHAR *pch;
wPasswordHash = 0;
if (cchPassword > 0) { pch = &szPassword[cchPassword]; while (pch-- != szPassword) { wPasswordHash = ((wPasswordHash >> 14) & 0x01) | ((wPasswordHash << 1) & 0x7fff); wPasswordHash ^= *pch; } wPasswordHash ^= (0x8000 | ('N' << 8) | 'K'); }
return(wPasswordHash); } end note]
The possible values for this attribute are defined by the ST_UnsignedShortHex simple type (§3.18.87). |
userName (User Name) |
Specifies the username of the person with write reservation for this workbook.
The possible values for this attribute are defined by the ST_Xstring simple type (§3.18.96). |
The following XML Schema fragment defines the contents of this element:
<complexType name="CT_FileSharing">
<attribute name="readOnlyRecommended" type="xsd:boolean" use="optional" default="false"/>
<attribute name="userName" type="ST_Xstring"/>
<attribute name="reservationPassword" type="ST_UnsignedShortHex"/>
</complexType>