The part xl/workbook.bin holds the settings of the whole workbook, the
list of sheets and the defined names. Record numbers are decimal, as [MS-XLSB] prints
them (see Records for the encoding);
section numbers are those of [MS-XLSB] v20261016. Strings named XLWideString have a
4-byte length in characters and then UTF-16; XLNullableWideString allows a length of
0xFFFFFFFF for “no string” (see cells).
Record order
The workbook part is, in [MS-XLSB]’s ABNF, in this order; square brackets are optional, a star means any number:
BrtBeginBook [BrtFileVersion] [[BrtFileSharingIso] BrtFileSharing] [BrtWbProp]
[ACABSPATH] [ACREVISIONPTR] [[BrtBookProtectionIso] BrtBookProtection] [BOOKVIEWS]
BUNDLESHS [FNGROUP] [EXTERNALS] *BrtName [BrtCalcProp] [BrtOleSize]
*(BrtUserBookView *FRT) [PIVOTCACHEIDS] [BrtWbFactoid] [SMARTTAGTYPES] [BrtWebOpt]
*BrtFileRecover [WEBPUBITEMS] [CRERRS] FRTWORKBOOK BrtEndBook
with ACABSPATH = BrtACBegin BrtAbsPath15 BrtACEnd; BOOKVIEWS = BrtBeginBookViews 1*([ACUID] BrtBookView *FRT) BrtEndBookViews; BUNDLESHS = BrtBeginBundleShs 1*BrtBundleSh BrtEndBundleShs (see cells); FNGROUP = BrtBeginFnGroup *BrtFnGroup BrtEndFnGroup; EXTERNALS = BrtBeginExternals *SUP BrtExternSheet BrtEndExternals; PIVOTCACHEIDS = BrtBeginPivotCacheIDs 1*PIVOTCACHEID BrtEndPivotCacheIDs; SMARTTAGTYPES = BrtBeginSmartTagTypes 1*BrtSmartTagType BrtEndSmartTagTypes; CRERRS = BrtBeginCRErrs *BrtCrashRecErr BrtEndCRErrs. FRTWORKBOOK gathers the later extensions: name extensions, slicer cache and pivot cache identifiers, the 2010 and 2013 workbook properties, timeline caches, the data model, calculation features and external link properties, each followed by any number of unknown future records.
Records
| Record | Fields |
|---|---|
| BrtBeginBook (131, 2.4.10), BrtEndBook (132) | No data: they enclose the workbook. |
| BrtFileVersion (128, 2.4.680) | Which application and versions touched the file. guidCodeName (16, GUID: the type library of the application that wrote the VBA project), stAppName (XLWideString: the application; other applications should not use “xl”), stLastEdited (the version that last saved), stLowestEdited (the lowest version that edited), stRupBuild (the build), all XLWideString. |
| BrtFileSharing (548, 2.4.678) | fReadOnlyRec (2, Boolean: read-only recommended), wResPass (2: the write-reservation password verifier; 0 none), stUserName (XLNullableWideString, at most 54 characters: who set it). BrtFileSharingIso (676) is the form with the ISO password hash. |
| BrtWbProp (153, 2.4.868) | Workbook properties. Flags (4 bytes): 0 f1904 (0 the 1900 date system, 1 the 1904 system), 1 reserved, 2 fHideBorderUnselLists (table borders hidden when not selected), 3 fFilterPrivacy (personal information is removed on save), 4 fBuggedUserAboutSolution, 5 fShowInkAnnotation, 6 fBackup, 7 fNoSaveSup (external link values are not cached), 8–9 grbitUpdateLinks (0 application-specific, 1 not automatically updated, 2 automatically updated), 10 fHidePivotTableFList, 11 fPublishedBookItems (0 each sheet by its own publishing state, 1 items decide), 12 fCheckCompat, 13–14 mdDspObj (0 shapes visible, 1 placeholders, 2 hidden), 15 fShowPivotChartFilter, 16 fAutoCompressPictures, 17 reserved, 18 fRefreshAll, 19–31 unused; then dwThemeVersion (4: the theme version), and strName (a CodeName: the code name of the workbook). |
| BrtBookProtection (534, 2.4.311) | protpwdBook (2: the verifier of the password that unlocks structure and window protection; 0 none), protpwdRev (2: for revision protection), wFlags (2, BookProtectionFlags: bit 0 fLockStructure (sheets cannot be moved, deleted, hidden, renamed or inserted), 1 fLockWindow (windows cannot be moved, resized or closed), 2 fLockRevision (change tracking is locked), 3–15 reserved). BrtBookProtectionIso (677) uses the ISO hash instead of the 2-byte verifier. The verifier algorithm is in [MS-XLSB] 2.2.9. |
| BrtBeginBookViews (135) and BrtBookView (158, 2.4.313) | One workbook window. xWn (4, signed), yWn (4, signed), dxWn (4), dyWn (4: left, top, width and height), iTabRatio (4: the share of the window used by the sheet tabs), itabFirst (4: the zero-based index of the first visible BrtBundleSh), itabCur (4: the active one), then flags: 0 fHidden, 1 fVeryHidden, 2 fIconic (minimised), 3 fDspHScroll, 4 fDspVScroll, 5 fBotAdornment (sheet tabs), 6 fAFDateGroup (dates are grouped in AutoFilter lists), 7 unused. |
| BrtUserBookView (397) | A custom view of the workbook (the per-view settings follow in the sheets). |
| BrtCalcProp (157, 2.4.318) | recalcID (4: the recalculation engine that last calculated), fAutoRecalc (4: 0 manual, 1 automatic, 2 automatic except tables), cCalcCount (4: iterations), xnumDelta (8, Xnum: the smallest change that stops iterating), cUserThreadCount (4, signed: the thread count), flags: 0 fFullCalcOnLoad, 1 fRefA1 (1 A1 style, 0 R1C1), 2 fIter (iterative calculation), 3 fFullPrec (0 means precision as displayed is selected, 1 not), 4 fSomeUncalced (the calculation was not finished before saving), 5 fSaveRecalc, 6 fMTREnabled (concurrent calculation), 7 fUserSetThreadCount, 8 fNoDeps (dependencies are ignored and every formula is calculated every time), 9–15 reserved. |
| BrtOleSize (549, 2.4.721) | rfx (16, UncheckedRfX): the range shown when the workbook is displayed as an embedded object. |
| BrtBeginFnGroup (664) and BrtFnGroup (665, 2.4.689) | stGroup (XLWideString, at most 32 characters): the name of a custom function category. |
| BrtAbsPath15 (2071, 2.4.1) | stAbsPath (XLWideString): the absolute path or URL of the folder of the workbook, without the file name. |
| BrtWbFactoid (154, 2.4.867) | Smart tag settings. Flags: 0 fEmbedFactoids (smart tags are saved in the workbook), 1–2 mdFactoidDisplay (0 the actions button and the indicator, 1 the button only, 2 neither), 3–7 unused. |
| BrtSmartTagType (596, 2.4.807) | NameSpaceUri (XLWideString, at most 2084 characters), Name (XLWideString, under 256 characters), Url (XLNullableWideString, at most 2084: a page about the smart tag). |
| BrtWebOpt (553, 2.4.871) | Options for saving as a web page. Flags: 0 fRelyOnCSS, 1 fOrganizeInFolder (supporting files go in a separate folder), 2 fUseLongFileNames, 3 reserved, 4 fRelyOnVML, 5 fAllowPNG, 6–15 reserved; screenSize (1, a WebScreenSizeEnum of [MS-OSHARED]), dwPixelsPerInch (4), uiCodePage (4: the code page). |
| BrtFileRecover (155, 2.4.677) | The state of the workbook file. Flags: 0 fDontAutoRecover, 1 fSavedDuringRecovery, 2 fCreatedViaMinimalSave, 3 fOpenedViaDataRecovery, 4 fOpenedViaSafeLoad, 5–7 reserved. |
| BrtCrashRecErr (610, 2.4.342) | stName (XLWideString, up to 65,535 characters): the description of an error found during an application fault. |
| BrtWorkBookPr15 (2091, 2.4.873) | An FRTBlank header (4) then flags: 0 fChartTrackingRefBased (data point properties and formatting follow the data point rather than its index), 1–7 reserved. |
Source
[MS-XLSB] Excel (.xlsb) Binary File Format, v20261016, 2.1.7.61 (Workbook), 2.4.1, 2.4.10, 2.4.311, 2.4.313, 2.4.318, 2.4.342, 2.4.677, 2.4.678, 2.4.680, 2.4.689, 2.4.721, 2.4.807, 2.4.867, 2.4.868, 2.4.871, 2.4.873 and 2.5.7. Not covered here: BrtName (with the defined names, see the formulas on the cells page), the sheet list (on the cells page), the external link records (BrtBeginExternals and its members), the pivot cache identifiers, web publish items, the 2010 and 2013 future records and BrtUserBookView’s fields.