These records hold settings that apply to the whole workbook. Nearly all of them sit in the globals substream, between its BOF and EOF; Protect, Password and CodeName also appear in sheet substreams, where they apply to that sheet. Section numbers are those of [MS-XLS] v20250819. Offsets count from the start of the record data, after the 4-byte record header; all integers are little-endian. A Boolean field (section 2.5.14) holds 0 for false or 1 for true, whatever its size. BOF, EOF, BoundSheet8, Index, DBCell and FilePass are on the streams page.
Future record headers
Records added after Excel 97 (types from 0x0800) start with one of
these headers, which repeat the record type so that a reader that does not know the
record can still recognise it (sections 2.5.134 to 2.5.139).
| Structure | Size | Layout |
|---|---|---|
| FrtHeaderOld | 4 | rt (2, the record type again), grbitFrt (2, FrtFlags; both flags 0). |
| FrtHeader | 12 | rt (2), grbitFrt (2, both flags 0), 8 reserved bytes (zero). |
| FrtRefHeader | 12 | rt (2), grbitFrt (2, fFrtAlert 0), ref8 (8, a Ref8 range; all zero when fFrtRef is 0). |
| FrtRefHeaderU | 12 | As FrtRefHeader, but the range is a Ref8U; ignored in Feature11 and Feature12. |
| FrtRefHeaderNoGrbit | 10 | rt (2) and ref8 (8, Ref8U), no flags. |
| FrtFlags | 2 | Bit 0 fFrtRef: the record names a range of cells. Bit 1 fFrtAlert: warn the user when saving a file in which this record was not understood. Bits 2–15 reserved. |
| Ref8 and Ref8U | 8 | rwFirst, rwLast, colFirst, colLast, 2 bytes each (sections 2.5.208, 2.5.209). Rows 0 to 0xFFFF or columns 0 to 0xFF mean whole columns or whole rows. |
Continuation records
Record data is limited to 8,224 bytes; longer data carries on in the records below, each placed straight after the record it continues (sections 2.4.58 to 2.4.62). See also the rule for strings split across Continue records.
| Type | Record | Layout |
|---|---|---|
0x003C | Continue | The next part of the preceding record’s data, fewer than 8,225 bytes. Some records that are short (TxO, for example) still put their text and formatting runs in following Continue records. |
0x0812 | ContinueFrt | FrtHeaderOld (4, rt = 0x0812), then fewer than 8,221 bytes of data. Continues a record that has an FrtHeaderOld or FrtHeader; how the data is split depends on the record (SXTH, for example, may break early). |
0x0875 | ContinueFrt11 | FrtHeader (12, rt = 0x0875), then fewer than 8,213 bytes. Continues a record that has an FrtRefHeaderU. |
0x087F | ContinueFrt12 | FrtRefHeader (12, rt = 0x087F; its range is the base record’s range when fFrtRef is 1, else zero), then fewer than 8,213 bytes. Continues a record that has an FrtRefHeader or FrtHeader. |
Calculation
| Type | Record | Data |
|---|---|---|
0x000C | CalcCount | cIter (2, signed): maximum iterations in iterative calculation, 1 to 32,767 (2.4.31). |
0x000D | CalcMode | fAutoRecalc (2, signed): 0 manual, 1 automatic, 2 automatic except data tables (2.4.34). |
0x000E | CalcPrecision | fFullPrec (2, Boolean): 0 means “precision as displayed” is on, 1 full precision (2.4.35). |
0x000F | CalcRefMode | fRefA1 (2, Boolean): 0 R1C1 references, 1 A1 (2.4.36). |
0x0010 | CalcDelta | numDelta (8, Xnum: an IEEE double that is not infinite, denormal, NaN or −0): iteration stops when no cell changes by more than this; at least 0 (2.4.32). |
0x0011 | CalcIter | vfIter (2, Boolean): iterative calculation on (2.4.33). |
0x005E | Uncalced | 2 reserved bytes (zero). Its presence means formulas were waiting to be recalculated when the file was saved (2.4.331). |
0x005F | CalcSaveRecalc | fSaveRecalc (2, Boolean): recalculate before saving when in manual mode (2.4.37). |
0x01C1 | RecalcId | rt (2, must be 449), 2 reserved, dwBuild (4): the identifier of the calculation engine that last recalculated. An application whose engine identifier is higher recalculates every formula on load (2.4.215). |
0x01B7 | RefreshAll | refreshAll (2, Boolean): 1 refresh external data ranges, PivotTables and XML maps when the workbook opens; must be 0 unless the workbook is a template (2.4.217). |
0x08A3 | ForceFullCalculation | FrtHeader (12), fNoDeps (4, Boolean): 0 only formulas depending on changed cells are recalculated, 1 every formula is recalculated each time (2.4.125). |
0x089A | MTRSettings | FrtHeader (12); fMTREnabled (4, Boolean) multithreaded calculation on; fUserSetThreadCount (4, Boolean) the thread count was set by the user; cUserThreadCount (4, signed) number of threads, 1 to 1,024, ignored unless both flags are 1 (2.4.173). |
0x0160 | UsesELFs | useselfs (2, Boolean): natural-language formulas supported; should be 0 (2.4.337). |
Protection, passwords and sharing
The 16-bit password verifiers below are made by converting the password to the system’s ANSI code page and passing it through the XOR obfuscation of [MS-OFFCRYPTO] section 2.3.7.1 (section 2.2.9). They stop accidental edits only; they are not security. Encryption itself is set by FilePass.
| Type | Record | Data |
|---|---|---|
0x0012 | Protect | fLock (2, Boolean). In the globals substream: 0 workbook structure not protected, 1 protected (the record must exist). In a sheet substream it exists only when the sheet is protected, and is then 1 (2.4.207). |
0x0013 | Password | wPassword (2): password verifier. In the globals 0 means no workbook password; a sheet has a password exactly when this record is present, and then it is not 0 (2.4.191). |
0x0019 | WinProtect | fLockWn (2, Boolean): 1 the workbook windows cannot be moved, resized, minimised or restored (2.4.347). |
0x0086 | WriteProtect | No data: the file is write-protected (2.4.350). |
0x01AF | Prot4Rev | fRevLock (2, Boolean): 1 the shared workbook’s revision log may not be removed (2.4.205). |
0x01BC | Prot4RevPass | protPwdRev (2): verifier of the password needed to change the preceding Prot4Rev; 0 no password (always 0 when fRevLock is 0) (2.4.206). |
0x005C | WriteAccess | userName (XLUnicodeString, at most 54 characters; two spaces mean no name) — the user who last created, opened or changed the file — then unused padding so the record is 112 bytes (2.4.349). |
FileSharing (0x005B)
Read-only recommendation and write-reservation password (2.4.118).
| Offset | Size | Field | Meaning |
|---|---|---|---|
0 | 2 | fReadOnlyRec | Boolean: open read-only recommended. |
2 | 2 | wResPass | Verifier of the write-reservation password; 0 none. |
4 | 2 | iNoResPass | Only when wResPass is 0; must be 0. |
4 | varies | stUNUsername | Only when wResPass is not 0: XLUnicodeString, at most 54 characters, the user who set the password. |
File, locale and VBA
| Type | Record | Data |
|---|---|---|
0x0022 | Date1904 | f1904DateSystem (2, Boolean): 0 the 1900 date system, where serial 1 is 00:00 on 1 January 1900; 1 the 1904 system, where serial 0 is 00:00 on 1 January 1904 (2.4.77). |
0x0040 | Backup | fBackup (2, Boolean): save a backup copy each time the workbook is saved (2.4.14). |
0x0042 | CodePage | cv (2): the workbook’s code page, a Windows code page number or 1200 for Unicode (2.4.52). |
0x0060 | Template | No data: the workbook is a template (2.4.323). |
0x0061 | Intl | 2 reserved bytes (zero), in a macro sheet: it is an international macro sheet (2.4.147). |
0x00E1 | InterfaceHdr | codePage (2, must be 0x04B0, Unicode): begins the user-interface records (2.4.146). |
0x00E2 | InterfaceEnd | No data: ends them (2.4.145). |
0x00C1 | Mms | Two reserved bytes (zero); ignored (2.4.169). |
0x0161 | DSF | 2 reserved bytes (zero); ignored (2.4.94). |
0x01C0 | Excel9File | No data; optional and unused (2.4.104). |
0x00D3 | ObProj | No data: the file has a VBA project, in the VBA storage (2.4.185). |
0x01BD | ObNoMacros | No data: the VBA project has no forms, modules or class modules (2.4.184). |
0x01BA | CodeName | codeName (XLUnicodeString, at most 31 characters): the VBA name of the workbook object (in the globals) or of the sheet object (in a sheet substream). It must start with a letter and continue with letters, digits or underscores once mapped to the system ANSI code page (2.4.51). |
0x0897 | GUIDTypeLib | FrtHeader (12), guid (16): the type library of the application that wrote the VBA project; should be all zero (2.4.133). |
0x088C | Compat12 | FrtHeader (12), fNoCompatChk (4, Boolean): 0 warn that newer features may be lost when saving to an older binary format, 1 save without asking (2.4.54). |
0x089B | CompressPictures | FrtHeader (12), fAutoCompressPictures (4, Boolean): picture compression on save is recommended (2.4.55). |
0x01C2 | EntExU2 | Application cache bytes that can be rebuilt from the rest of the file; should not be written and should be ignored (2.4.102). |
Country (0x008C)
Two 2-byte country/region codes (2.4.63): iCountryDef, from the locale in
effect when the file was saved, and iCountryWinIni, from the system
regional settings. Both are 1 to 981 and must be one of these codes:
| Code | Country/region | Code | Country/region | Code | Country/region |
|---|---|---|---|---|---|
| 1 | United States | 44 | United Kingdom | 216 | Morocco |
| 2 | Canada | 45 | Denmark | 218 | Libya |
| 3 | Latin America except Brazil | 46 | Sweden | 351 | Portugal |
| 7 | Russia | 47 | Norway | 354 | Iceland |
| 20 | Egypt | 48 | Poland | 358 | Finland |
| 30 | Greece | 49 | Germany | 420 | Czech Republic |
| 31 | Netherlands | 52 | Mexico | 886 | Taiwan |
| 32 | Belgium | 55 | Brazil | 961 | Lebanon |
| 33 | France | 61 | Australia | 962 | Jordan |
| 34 | Spain | 64 | New Zealand | 963 | Syria |
| 36 | Hungary | 66 | Thailand | 964 | Iraq |
| 39 | Italy | 81 | Japan | 965 | Kuwait |
| 41 | Switzerland | 82 | Korea | 966 | Saudi Arabia |
| 43 | Austria | 84 | Viet Nam | 971 | United Arab Emirates |
| 86 | People’s Republic of China | 90 | Turkey | 972 | Israel |
| 213 | Algeria | 974 | Qatar | ||
| 981 | Iran |
BookBool (0x00DA)
Two bytes of workbook flags (2.4.22):
| Bits | Field | Meaning |
|---|---|---|
| 0 | fNoSaveSup | 0 external link values are saved in the file, 1 they are not. |
| 1 | reserved | Zero. |
| 2 | fHasEnvelope | The workbook has a mail envelope (must be 1 if either of the next two is 1). |
| 3 | fEnvelopeVisible | The envelope is shown. |
| 4 | fEnvelopeInitDone | The envelope has been initialised. |
| 5–6 | grUpdateLinks | Updating external links: 0 ask the user, 1 never update and do not ask, 2 update silently (an application may still ask, for security). |
| 7 | unused | |
| 8 | fHideBorderUnselLists | Hide the borders of tables that do not hold the active cell. |
| 9–15 | reserved | Zero. |
BookExt (0x0863)
More workbook flags (2.4.23):
| Offset | Size | Field | Meaning |
|---|---|---|---|
0 | 12 | frtHeader | FrtHeader, rt = 0x0863. |
12 | 4 | cb | Size of the record in bytes (20, 21 or 22). |
16 | 4 | flags | Bit 0 fDontAutoRecover (AutoRecover off); 1 fHidePivotList (PivotTable field list hidden); 2 fFilterPrivacy (remove personal information on save); 3 fEmbedFactoids (save smart tags); 4–5 mdFactoidDisplay: 0 show the smart tag actions button and indicator, 1 the button only, 2 neither; 6 fSavedDuringRecovery; 7 fCreatedViaMinimalSave (minimal save during data recovery); 8 fOpenedViaDataRecovery; 9 fOpenedViaSafeLoad; 10–31 reserved. |
20 | 1 | grbit1 | Present when cb > 20. BookExt_Conditional11 (2.5.12): bit 0 fBuggedUserAboutSolution (warn before loading a smart-document manifest), bit 1 fShowInkAnnotation (ink comments visible), bits 2–7 unused. |
21 | 1 | grbit2 | Present when cb > 21. BookExt_Conditional12 (2.5.13): bit 0 reserved; bit 1 fPublishedBookItems: 0 publish sheets to a server (except those whose SheetExt says not published), 1 publish only items flagged as published (chart objects in FtCmo, tables in Feature11, names in Lbl and NamePublish, PivotTables in SXAddl_SXCView_SXDVer12Info); bit 2 fShowPivotChartFilter (show the PivotChart filter pane); bits 3–7 reserved. |
CrErr (0x0865)
Errors found while recovering a workbook after a crash (2.4.64): FrtHeader (12,
rt = 0x0865); cb (4, must be 0x13);
cch (2, greater than 0, characters in the message); rgch, the
localised message as an XLUnicodeString. Messages longer than 8,211 characters carry on
in Continue records, each starting with the high-byte flag of the string.
Workbook window
Window1 (0x003D)
A workbook window (2.4.345). Each Window1 has a matching Window2 in every sheet substream, in the same order.
| Offset | Size | Field | Meaning |
|---|---|---|---|
0 | 2 | xWn | Left edge in twips, relative to the client area (signed). |
2 | 2 | yWn | Top edge in twips (signed). |
4 | 2 | dxWn | Width in twips, at least 1. |
6 | 2 | dyWn | Height in twips, at least 1. |
8 | 2 | flags | Bit 0 fHidden; 1 fIconic (minimised); 2 fVeryHidden (hidden and not listed as hidden); 3 fDspHScroll (horizontal scroll bar shown); 4 fDspVScroll; 5 fBotAdornment (sheet tabs shown); 6 fNoAFDateGroup: 0 the AutoFilter menu groups dates by year, month and day, 1 lists them in order; 7–15 reserved. |
10 | 2 | itabCur | Selected sheet tab: TabIndex, a zero-based index into the BoundSheet8 records (2.5.265). |
12 | 2 | itabFirst | First sheet tab shown (TabIndex). |
14 | 2 | ctabSel | Number of selected sheet tabs. |
16 | 2 | wTabRatio | Width of the tab area relative to the horizontal scroll bar, × 1000 (at most 1000). |
HideObj (0x008D, 2.4.139): one 2-byte
HideObjEnum (2.5.158) saying how ActiveX, OLE and drawing objects are shown: 0
SHOWALL, 1 SHOWPLACEHOLDER (placeholders instead), 2
HIDEALL.
Function categories
| Type | Record | Data |
|---|---|---|
0x009C | BuiltInFnGroupCount | count (2): number of built-in function categories, which begins the function-category records (2.4.30). 0x0E: 14 categories, of which Financial, Date & Time, Math & Trig, Statistical, Lookup & Reference, Database, Text, Logical and Information are shown and UserDefined, Commands, Customize, MacroControl and DDEExternal are hidden. 0x10: 16, adding Engineering and Cube to the shown ones. Built-in plus user categories must total at most 256. |
0x009A | FnGroupName | rgch: XLUnicodeString of at most 32 characters, a user-defined category name, distinct from the others (2.4.120). |
0x0898 | FnGrp12 | FrtHeader (12), astFnGrp (XLUnicodeString, at most 32 characters): a user category after the 32nd (2.4.121). |
0x0899 | NameFnGrp12 | FrtHeader (12); cachName (2, 1 to 255) length of the name; fgrp (2, 32 to 255) category index, where fgrp − 32 is the index of an FnGrp12 record; rgach, the function name as an XLNameUnicodeString (2.4.177). |
Routing slip
DocRoute (0x00B8)
A routing slip for sending the workbook round by e-mail; RecipName records for its recipients follow it (2.4.91).
| Offset | Size | Field | Meaning |
|---|---|---|---|
0 | 2 | iStage | Routing stage, at most cRecip + 1. |
2 | 2 | cRecip | Number of RecipName records that follow. |
4 | 2 | delOption | 0 one recipient at a time, 1 all at once. |
6 | 2 | flags | Bit 0 fRouted; 1 fReturnOrig (back to the sender after the last recipient); 2 fTrackStatus (status messages to the sender); 3 fCustomType (szCustType is used); 4–6 unused; 7 fSaveRouteInfo (must be 1); 8–15 unused. |
8 | 2 × 6 | cchSubject, cchMessage, cchRouteID, cchCustType, cchBookTitle, cchOrg | Character counts of the strings below, each at most 256 (cchCustType 0 unless fCustomType). |
20 | 4 | ulEIDSize | Length of rgchSSAddr; all lengths together at most 8,202. |
24 | varies | szSubject, szMessage, szRouteID, szCustType, szBookTitle, szOrg, rgchSSAddr | Null-terminated ANSI strings in this order, each absent when its count is 0: subject, message, routing id, custom message type, workbook title, sender’s name, and the mail system’s identifier of the sender. |
RecipName (0x00B9, 2.4.216):
cchRecip (2, at most 256), ulEIDSize (4), then
szFriendly (null-terminated ANSI, the recipient’s name) and
rgchSSAddr (ANSI, ulEIDSize characters, the mail system’s
identifier of the recipient).
Saving as a web page
WOpt (0x080B)
Options for saving as a web page (2.4.348).
| Offset | Size | Field | Meaning |
|---|---|---|---|
0 | 4 | frtHeaderOld | FrtHeaderOld, rt = 0x080B. |
4 | 2 | flags | Bit 0 fRelyOnCSS (fonts formatted with CSS); 1 fOrganizeInFolder: 0 supporting files beside the page, 1 in a separate folder; 2 fUseLongFileNames; 3 fDownloadComponents (download the Office Web Components if missing); 4 fRelyOnVML (graphics as VML); 5 fAllowPNG; 6–15 reserved. |
6 | 1 | screenSize | Target minimum screen size, a WebScreenSizeEnum of [MS-OSHARED] section 2.2.1.4. |
7 | 1 | reserved | Zero. |
8 | 4 | dwPixelsPerInch | Image and cell density, 19 to 480. |
12 | 4 | uiCodePage | Code page the browser should use. |
16 | varies | rgbLocationOfComponents | LPWideString (2-byte character count, then UTF-16 characters; at most 2,083): where users can download the Office Web Components. |
| … | varies | rgbFuture | The rest of the record, reserved for future use. |
WebPub (0x0801)
One published web page (2.4.344).
| Offset | Size | Field | Meaning |
|---|---|---|---|
0 | 12 | frtRefHeaderU | FrtRefHeaderU; its range is the published cells when tws is 4 (then fFrtRef is 1), otherwise fFrtRef is 0. |
12 | 1 | tws | What was published: 0xFF undefined, 0 workbook, 1 whole sheet, 2 print area, 3 AutoFilter range, 4 range of cells, 5 chart, 6 PivotTable report, 7 query table (external data range), 8 named range. |
13 | 1 | twd | Kind of page: 0 static, for viewing only; 1 with spreadsheet functionality; 2 with PivotTable functionality; 3 with chart functionality. |
14 | 2 | flags | Bit 0 unused; 1 fAutoRepublish (republish whenever the workbook is saved); 2 reserved; 3 fMhtml (single-file web page rather than a page with linked files); 4–15 reserved. |
16 | 2 | reserved | Zero. |
18 | 2 | unused | |
20 | 4 | nStyleId | Unique id of this published item. |
24 | 4 | cb | Size of everything that follows (greater than 0). |
28 | varies | srcName | Only when tws > 4: the named item published (WebPubString, at most 255 characters). |
| … | varies | stFileDest | Path or URL of the published page (WebPubString, at most 255). |
| … | varies | stDivId | Destination bookmark (WebPubString, at most 255). |
| … | varies | stTitle | Title (WebPubString). |
| … | 4 | crtID | Only when tws is 5: the chart’s shape id (MSOSPID, [MS-ODRAW]). |
| … | varies | frtRgb | Reserved bytes: record size − 30 − the strings and crtID. |
| … | 2 | unused |
A WebPubString (2.5.278) is a 2-byte character count (0 to 255), the characters as an XLUnicodeStringNoCch, and one pad byte when the characters take an odd number of bytes.