Excel 2002 and later added information to PivotTables that the original
pivot records had no room for:
OLAP hierarchies and groups, new filters, conditional formats, table styles, display
captions. Instead of a new record type each, they all use one, SXAddl
(0x0864), whose 6-byte header says what is inside. An older reader that does not know
a class skips it. Section numbers are those of [MS-XLS] v20250819 (2.4.273.n);
integers are little-endian.
The header
Every SXAddl record starts with an SXAddlHdr (6 bytes): frtHeaderOld (4,
rt 0x0864), sxc (1, the class) and sxd
(1, the type within the class). Together they select the layout of the rest,
the data field. Three types mean the same in every class:
sxd | Meaning | Data |
|---|---|---|
0x00 | …_SXDId: starts an instance of the class | depends on the class (below) |
0x01 | …_SXDVerUpdInv: records after this are handled only up to a data functionality level | SXAddl_SXDVerUpdInv, 12 bytes in all: the header, dwVersionInvalidates (1: the highest level handled, 0xFF if not set), 1 reserved, 2 reserved, 2 reserved |
0xFF | …_SXDEnd: ends the instance | SXAddl_SXDEnd: the header then 6 reserved zero bytes |
A string longer than 255 characters is split: the first 255 are in the SXAddl record
(an SXAddl_SXString holding an XLUnicodeStringSegmentedSXADDL, with total length up to
65535) and the rest in Continue_SxaddlSxString records straight after,
each with the same sxc and sxd in its header and the next
segment. Where a table below says a record carries a “string”, this is what it means.
One oddity: the end record of the cache item class (sxc 0x09, sxd 0xFF)
is counted by the spec as belonging to the cache field class.
The classes (2.2.5.1.1.1):
sxc | Class | What it extends |
|---|---|---|
| 0x00 | SxcView | the PivotTable view |
| 0x01 | SxcField | a pivot field |
| 0x02 | SxcHierarchy | a pivot hierarchy (OLAP) |
| 0x03 | SxcCache | the PivotCache |
| 0x04 | SxcCacheField | a cache field |
| 0x05 | SxcQsi | a query table |
| 0x06 | SxcQuery | the query of a cache |
| 0x07 | SxcGrpLevel | an OLAP group level |
| 0x08 | SxcGroup | an OLAP group |
| 0x09 | SxcCacheItem | a cache item |
| 0x0C | SxcSXRule | a PivotTable rule |
| 0x0D | SxcSXFilt | a rule filter |
| 0x10 | SxcSXDH | a dimension header |
| 0x12 | SxcAutoSort | AutoSort of a field |
| 0x13 | SxcSXMgs | the OLAP measure groups |
| 0x14 | SxcSXMg | one measure group |
| 0x17 | SxcField12 | a pivot field (Excel 2007) |
| 0x1A | SxcSXCondFmts | the conditional formats of a view |
| 0x1B | SxcSXCondFmt | one conditional format |
| 0x1C | SxcSXFilters12 | the advanced filters of a view |
| 0x1D | SxcSXFilter12 | one advanced filter |
The tables below list each record with its sxd, the fields the spec gives
and what the text says they do. Records written “string” carry a string as above; the
“…_SXDId”, “…_SXDVerUpdInv” and “…_SXDEnd” records of each class (types 0x00, 0x01,
0xFF) are named only where they carry something of their own. The spec’s own header
tables have a few apparent mistakes (the SxcQuery end record is given sxc
0x07 and the group level info record 0x08); the values are those printed.
View (0x00)
sxd | Record | Contents |
|---|---|---|
| 0x02 | SXCView_SXDVer10Info (2.4.273.108) | bVerSxMacro (1, a DataFunctionalityLevel), then flags including fDisplayImmediateItems (items are shown in the field list as soon as they are available), fEnableDataEd (values may be edited), fDisableFList (field list disabled), fReenterOnLoadOnce and others. |
| 0x03 | SXCView_SXDCalcMember (.100) | A calculated OLAP member. Flags say which strings exist: fParentUnique (stParentUnique), fMemberName (stMemberName), fSourceHier (stSourceHierarchy), fLongFormula (the MDX formula is too long for one record and continues in CalcMemString records), fSet (a set rather than a member), then the strings and the user’s MDX formula. |
| 0x0A | SXCView_SXDCalcMemString (.101) | A string: the continuation of a calculated member’s formula. |
| 0x19 | SXCView_SXDVer12Info (.109) | Flags: fDefaultCompact and fDefaultOutline (the layout given to new pivot fields), fOutlineData and fCompactData (the data field is in outline or compact form), fNewDropZones (the application allows dropping fields in the new layout’s zones) and more. |
| 0x1E | SXCView_SXDTableStyleClient (.107) | Flags telling which table style elements apply: fLastColumn, fRowStrips, fColumnStrips, fRowHeaders, fColumnHeaders and others (see TableStyle in styles). |
| 0x21 | SXCView_SXDCompactRwHdr (.103) | A string: the row header caption in compact layout. |
| 0x22 | SXCView_SXDCompactColHdr (.102) | A string: the column header caption in compact layout. |
| 0x36 | SXCView_SXDSXPIIvmb (.106) | isxpi (4: the index of an entry on the page axis), ivmb (4: the zero-based index of an MDB record, see names, links and queries). |
Fields: SxcField (0x01), SxcField12 (0x17), SxcAutoSort (0x12)
sxc/sxd | Record | Contents |
|---|---|---|
| 0x01 / 0x02 | SXCField_SXDVer10Info (.27) | Flags: fHideDD (the drop-down of the pivot field is hidden) and others. |
| 0x17 / 0x37 | SXCField12_SXDAutoshow (.28) | citmAutoShow (4): the number of items for simple filters. |
| 0x17 / 0x1C | SXCField12_SXDISXTH (.31) | isxth (4): the pivot hierarchy this pivot field belongs to. |
| 0x17 / 0x11 | SXCField12_SXDMemberCaption (.32) | A string: the name of the member property used as caption. |
| 0x17 / 0x19 | SXCField12_SXDVer12Info (.33) | Flags: 0 reserved, 1 fHiddenLvl (an OLAP level that is hidden), 2 fUseMemPropCaption (a member property is used as caption), 3 fCompact (0 the next pivot field shows in the next column, 1 in the same column), 4 fNotAutoSortDft, 5 fFilterInclusive (a manual filter lists items that are included, not excluded). |
| 0x12 / 0x00 | SXCAutoSort_SXDId (.4) | fAscendSort (bit 0: 1 ascending, 0 descending), 31 reserved bits, 2 reserved bytes. End record: .3. |
Hierarchies (0x02)
sxd | Record | Contents |
|---|---|---|
| 0x05 | SXCHierarchy_SXDProperty (.57) | A member property: flags fDisplayInReport, fDisplayInTip, fDisplayInCaption, then cchProperty (2), cchLevelUnq (2) and the strings (the property name and the unique name of its level). |
| 0x09 | SXCHierarchy_SXDFilterMember (.44) | Members used in OLAP page filtering: a flag word (bit 0 reserved and 1, bit 1 fMultFiltHavePlex: several members are selected), cItems (2) then rgStPageItems, that many strings. |
| 0x1D | SXCHierarchy_SXDSXSetParentUnique (.58) | A string: the unique name of the parent of a set. |
| 0x1F | SXCHierarchy_SXDUserCaption (.59) | A string: the user’s caption of the hierarchy. |
| 0x20 | SXCHierarchy_SXDIconSet (.46) | dwIconset (4): the icon set of a KPI: 0 default, 6 traffic lights, 7 traffic lights 2, 8 quarters ascending, 9 quarters descending, 10 signs, 11 symbols. |
| 0x24 | SXCHierarchy_SXDMeasureGrp (.55) | A string: the measure group the hierarchy belongs to. |
| 0x25 | SXCHierarchy_SXDDisplayFolder (.42) | A string: the display folder. |
| 0x26 | SXCHierarchy_SXDParentKPI (.56) | A string: the parent KPI. |
| 0x27 | SXCHierarchy_SXDKPIValue (.53) | A string: the MDX unique name of the KPI’s value. |
| 0x28 | SXCHierarchy_SXDKPIGoal (.49) | A string: the unique name of the KPI’s goal. |
| 0x29 | SXCHierarchy_SXDKPIStatus (.50) | A string: the KPI’s status. |
| 0x2A | SXCHierarchy_SXDKPITrend (.52) | A string: the KPI’s trend. |
| 0x2B | SXCHierarchy_SXDKPIWeight (.54) | A string: the KPI’s weight. |
| 0x2C | SXCHierarchy_SXDKPITime (.51) | A string: the KPI’s time member. |
| 0x3F | SXCHierarchy_SXDFilterMember12 (.45) | An OLAP manual filter: isxtl (4: the zero-based ordinal of the level), cItems (2) and rgStMembers, that many strings. |
| 0x41 | SXCHierarchy_SXDInfo12 (.48) | Flags: fUnbalancedRealKnown, fUnbalancedReal (the hierarchy is unbalanced), fUnbalancedGroupKnown, fUnbalancedGroup (the OLAP group hierarchy is unbalanced), fHidden (the OLAP hierarchy is hidden). |
Cache (0x03), cache field (0x04) and cache item (0x09)
sxc/sxd | Record | Contents |
|---|---|---|
| 0x03 / 0x00 | SXCCache_SXDId (.6) | idCache (4): the PivotCache stream the class is associated with. |
| 0x03 / 0x02 | SXCCache_SXDVer10Info (.9) | citmGhostMax (4, signed: how many unused cache items are allowed), bVerCacheLastRefresh (1) and bVerCacheRefreshableMin (1) (DataFunctionalityLevel: the level that last refreshed the cache and the lowest that may refresh it), numDateCopy (8, a DateAsNum: the date and time of the refresh), plus flags. |
| 0x03 / 0x18 | SXCCache_SXDVerSXMacro (.10) | dwVer (1, DataFunctionalityLevel). |
| 0x03 / 0x34 | SXCCache_SXDInvRefreshReal (.8) | Flags: bit 0 fEnableRefresh, bit 1 fInvalid (the cache records are not valid). |
| 0x03 / 0x41 | SXCCache_SXDInfo12 (.7) | Flags: bit 0 fSheetData (must be 0), 1 fSrvSupportAttribDrill, 2 fSrvSupportSubQuery (what the data source supports). |
| 0x04 / 0x05 | SXCCacheField_SXDProperty (.17) | ihdb (4): a pivot hierarchy index. |
| 0x04 / 0x2D | SXCCacheField_SXDSxrmitmCount (.19) | citm (4): the number of cache item records. |
| 0x04 / 0x2F | SXCCacheField_SXDCaption (.12) | A string: the caption of the cache field. |
| 0x04 / 0x30 | SXCCacheField_SXDIfdbMempropMap (.15) | The indexes of the member property cache fields (an array). |
| 0x04 / 0x31 | SXCCacheField_SXDIfdbMpMapCount (.16) | ifdbMemProp (4): the number of elements of that array. |
| 0x04 / 0x40 | SXCCacheField_SXDPropName (.18) | A string: the name of a member property of the field. |
| 0x09 / 0x00 | SXCCacheItem_SXDId (.21) | dwItem (4): the cache item index this class belongs to. End record (0x09/0xFF): .20. |
| 0x09 / 0x2E | SXCCacheItem_SXDSxrmitmDisp (.24) | A string: the display name of the cache item. |
| 0x09 / 0x32 | SXCCacheItem_SXDItmMpropMap (.23) | The mapping of the member properties of an item (an array). |
| 0x09 / 0x33 | SXCCacheItem_SXDItmMpMapCount (.22) | cMemProps (4): the number of member property mappings. |
Groups (0x07, 0x08) and measure groups (0x13, 0x14)
sxc/sxd | Record | Contents |
|---|---|---|
| 0x08 / 0x06 | SXCGrpLevel_SXDGrpLevelInfo (.40) | Flags: bit 0 fGroupLevel (1 a user-defined group level, 0 one that corresponds to a level of the source cube), 1 reserved, 2 fCustomRollup. (Its end record, .39, and Id, .41, are in class 0x07.) |
| 0x08 / 0x07 | SXCGroup_SXDGrpInfo (.36) | An OLAP group: flags (including fHasNoParent: stParentUniqueName is absent), iGroupNum (4, signed: the group’s unique number within its level) and strings. |
| 0x08 / 0x08 | SXCGroup_SXDMember (.38) | An OLAP member or a group name: flags bit 1 fGroup (0 an OLAP member, 1 the name of a group) and a string. |
| 0x13 / 0x00 | SXCSXMgs_SXDId (.95) | cmgs (4: the number of OLAP measure groups), cmaps (4: the number of mappings between measure groups and hierarchies). |
| 0x13 / 0x23 | SXCSXMgs_SXDMGrpSXDHMap (.96) | iKey (4: a zero-based index of a SxcSXMg class) and iVal (4: a zero-based index of the hierarchy it maps to). |
| 0x14 / 0x1F | SXCSXMg_SXDUserCaption (.93) | A string: the caption of the measure group. Id .92, end .91. |
Rules, filters, headers, conditional formats and queries
sxc/sxd | Record | Contents |
|---|---|---|
| 0x0C / 0x13 | SXCSXrule_SXDSXrule (.99) | The extended form of a pivot rule: sxrtype (4 bits: the area of the table), then fPart, fDataOnly, fLabelOnly, fGrandRw, fGrandCol and more, as in SxRule. Id .98, end .97. |
| 0x0D / 0x14 | SXCSXfilt_SXDSXfilt (.77) | Flags: sxaxisRw, sxaxisCol, 1 reserved, sxaxisData, fSelected (the pivot field header is included), more; the extended form of SxFilt. |
| 0x0D / 0x15 | SXCSXfilt_SXDSXItm (.78) | The item indexes of that filter (the extended SxItm). |
| 0x10 / 0x00 | SXCSXDH_SXDId | dwCount (4): the number of SXAddl records of the type that follows. |
| 0x10 / 0x1A | SXCSXDH_SXDSxdh | A dimension header: isxth (4, signed: a pivot hierarchy), cchDimensionName, cchDimensionUnique, cchDimensionCaption (2 each) and the three strings. |
| 0x1A / 0x00 | SXCSXCondFmts_SXDId | cSxcondfmt (4, signed): the number of SxcSXCondFmt instances. End: 0x1A/0xFF. |
| 0x1B / 0x35 | SXCSXCondFmt_SXDSXCondFmt | A PivotTable conditional format: sxcondfmtScope (4: the scope), sxcondfmtType (4: the type), ipriority (4: the priority) and csxrule (4: the number of SxcSXrule classes it contains). End: 0x1B/0xFF. |
| 0x1C / 0x00 | SXCSXFilters12_SXDId | cSxfilter12 (4): the number of advanced filters. End: 0x1C/0xFF. |
| 0x1D / 0x00 | SXCSXFilter12_SXDId | dwFilterid (4): the unique identifier of the filter. End: 0x1D/0xFF. |
| 0x1D / 0x2F | SXCSXFilter12_SXDCaption | A string: the filter’s caption. |
| 0x1D / 0x38 | SXCSXFilter12_SXDSXFilter | An advanced filter: isxvd (4: the pivot field), isxvdMProp (4, signed: the member property pivot field the filter is on), sxft (4, an SxFT: the advanced filter type), 4 unused, isxdiMeasure (4, signed: the data item the filter measures), isxthMeasure (4: the hierarchy of the measure) and more. |
| 0x1D / 0x39 | SXCSXFilter12_SXDSXFilterDesc | A string: the filter’s description. |
| 0x1D / 0x3A, 0x3B | SXCSXFilter12_SXDSXFilterValue1, Value2 | Strings: the filter’s first and second values. |
| 0x1D / 0x3C | SXCSXFilter12_SXDXlsFilter | cft (4: a CFT, the custom filter type), ccriteria (4, signed: the number of criteria), then data (28 bytes: the filter data, an AutoFilter structure). |
| 0x1D / 0x3D, 0x3E | SXCSXFilter12_SXDXlsFilterValue1, Value2 | Strings: the first and second values of the custom filter. |
| 0x05 / 0x00 | SXCQsi_SXDId | Starts the query table class (end 0x05/0xFF). |
| 0x06 / 0x04 | SXCQuery_SXDXMLSource | A string: the XML data source. |
| 0x06 / 0x05 | SXCQuery_SXDSrcDataFile | A string: the source data file. |
| 0x06 / 0x06 | SXCQuery_SXDSrcConnFile | A string: the source connection file. |
| 0x06 / 0x07 | SXCQuery_SXDReconnCond | rccDBQuery (4): the reconnect condition of the database query. End: 0x07/0xFF as printed in the spec. |
Source
[MS-XLS] Excel Binary File Format (.xls) Structure, v20250819: 2.2.5.1.1 (the classes), 2.4.273 (the 110 SXAddl record sections, 2.4.273.1 to 2.4.273.110), 2.5.250 to 2.5.253. The sections were read from a text extract of the PDF; the sxc and sxd values come from each section’s header statement. Not covered: the bit positions and complete field lists of the larger records (SXCView_SXDVer10Info and Ver12Info, SXCView_SXDCalcMember, SXCView_SXDTableStyleClient, SXCGroup_SXDGrpInfo, SXCSXFilter12_SXDSXFilter, SXCCache_SXDVer10Info), the record order (the SXADDL ABNF rules of 2.1.7), and the strings’ exact framing, which is the XLUnicodeStringSegmentedSXADDL structure.