This page covers the data chapters of ECMA-376 5th edition Part 1 chapter 18: 18.9 metadata, 18.11 shared workbook revisions, 18.12 query tables, 18.13 connections, 18.14 external links, 18.15 volatile dependencies and 18.16 custom XML maps, with Excel’s notes from [MS-OI29500] v20260818, 2.1.722 to 2.1.736 and 2.1.804 to 2.1.858. Notes marked Excel: state what Office does where it differs from or adds to the standard. The other chapters of the group are listed under Not described.
Metadata part (18.9)
The metadata part (xl/metadata.xml, root metadata) holds records that
cells point to through the cm (cell metadata) and vm (value metadata)
attributes of the c element; the cells page says how those two are numbered. The root has these children, in
this order of purpose:
| Element | Holds |
|---|---|
metadataTypes / metadataType | One entry per kind of metadata: its name, the minimum supported version and a set of Boolean flags that say how the metadata behaves when the cell is copied, pasted, cleared, merged, split or moved. |
metadataStrings / s | The string store used by MDX (multidimensional expression) records. |
mdxMetadata / mdx | MDX records. Each mdx has an n (connection name index) and an f (function type), with a child describing the tuple, set, member property or KPI. |
futureMetadata / bk | Records for metadata types defined by later versions; each bk block holds an extension list. |
cellMetadata, valueMetadata / bk / rc | The blocks that a cell’s cm or vm selects. Each rc is a record reference with t (the metadata type) and v (the record within that type). |
The standard says that clearing, pasting, merging or splitting with the matching flag false
(or 0) disassociates the metadata from the cell. The flags are the attributes of
metadataType: adjust, assign, cellMeta,
clearAll, clearComments, clearContents, clearFormats,
coerce, copy, delete, edit, ghostCol,
ghostRow, merge, pasteAll, pasteBorders,
pasteColWidths, pasteComments, pasteDataValidation,
pasteFormats, pasteFormulas, pasteNumberFormats,
pasteValues, rowColShift, splitAll and splitFirst,
plus the required name and minSupportedVersion. All flags default to false.
Enumerations
| Type | Values (18.18.44 to 18.18.46) |
|---|---|
ST_MdxFunctionType (mdx@f) | c cube set count (CUBESETCOUNT), k cube KPI member (CUBEKPIMEMBER), m cube member (CUBEMEMBER), p cube member property (CUBEMEMBERPROPERTY), r cube ranked member (CUBERANKEDMEMBER), s cube set (CUBESET), v cube value (CUBEVALUE) |
ST_MdxKPIProperty (k@p) | g goal, m current time member, s status, t trend, v value, w weight |
ST_MdxSetOrder (ms@o) | a ascending, aa alpha ascending (by caption), ad alpha descending, d descending, na natural ascending (usually by key), nd natural descending, u unsorted |
Shared workbook revisions (18.11)
A shared workbook (or one with track changes on) records its edits as revision logs. A
headers part (root headers, CT_RevisionHeaders) lists
one header per saved set of changes. Each header names, through its
r:id, a relationship to a revision log part (root
revisions, CT_Revisions) that holds the individual changes. A third part,
users (root users), lists who has the workbook open. The standard’s
own example saves a header table, then logs rcc (a cell receives the text “foo”),
then ris and two rcv records (a sheet is inserted, which also updates the
user’s custom view).
Headers part
| Element | Attributes and meaning |
|---|---|
headers | guid (GUID of the last set of revisions; must equal the guid of the most recent header), lastGuid (the last set saved by a full save; a reader applies every revision from lastGuid to guid to reach the current state), revisionId (current revision number), version (integer, counting from 1), keepChangeHistory, preserveHistory (days to keep history), protected, diskRevisions, exclusive, history, shared, trackRevisions. The Booleans diskRevisions, exclusive, history, shared and trackRevisions exist for backward compatibility and need not be used when creating files. Children: one or more header. |
header | guid, dateTime (when the set was saved, xsd:dateTime), userName, r:id (relationship to the log), minRId and maxRId (lowest and highest revision id in that log; a reader uses them to find the log for a given revision id), maxSheetId (internal id of the next free sheet, 1-based). Children: sheetIdMap (required; count and a list of sheetId with val, one per sheet), optional reviewedList (count and reviewed children whose rId is the id of a revision that has been accepted in the track-changes review and saved), optional extLst. |
userInfo (in users) | id (internal user id, may be negative), name (display name; the standard notes names should not exceed 54 characters), guid (the last set of revisions this user is synchronised to, so that the application does not delete revisions the user depends on), dateTime (when the user opened the workbook). users has count (users with the workbook open; read-only users are not listed) and at most 256 userInfo children. |
Revision log records
The revisions root holds, in this order and each any number of times: rrc,
rm, rcv, rsnm, ris, rcc,
rfmt, raf, rdn, rcmt, rqt,
rcft (from CT_Revisions in sml.xsd). Most records carry rId
(revision number, for reviewable revision types only), ua (the revision happened because
another revision was rejected, that is, as an undo) and ra (the revision happened because
an earlier undo was itself rejected). The standard’s example inserts column A (rrc
action="insertCol"), has user 2 reject it (a deleteCol with ua="1"
plus an rcft conflict record), and then user 1 wins the conflict (an insertCol
with ua="1" ra="1").
| Element | Records | Attributes and children |
|---|---|---|
rcc | A change to cell contents | sId (sheet), rId, ua, ra, odxf (old differential formatting is available), xfDxf, s (the change affected the cell style), dxf (a differential format change), numFmtId, quotePrefix, oldQuotePrefix, ph, oldPh, endOfListFormulaUpdate (the formula at the end of an automatic list was updated). Children: oc (old cell, optional), nc (new cell, required), odxf, ndxf (CT_Dxf), extLst. oc and nc are CT_Cell with r, s, t, cm, vm, ph; the standard says only the data type and reference are needed and the rest can be written out as rfmt records. |
rfmt | A formatting change | sheetId, sqref (range; whole columns and rows are written in full, such as A1:A1048576 and A1:XFD1), start and length (the characters of a string that changed), s, xfDxf, rId, ua, ra. Children: dxf. |
raf | A table auto-format change | sheetId, ref, autoFormatId (legacy table auto-format; Annex D of Part 1 lists the PivotTable auto-formats), and the Booleans applyNumberFormats, applyBorderFormats, applyFontFormats, applyPatternFormats, applyAlignmentFormats, applyWidthHeightFormats. |
rrc | Row or column insert or delete | sId, ref, action (insertRow, deleteRow, insertCol, deleteCol; ST_rwColActionType), edge (a delete at the edge of a sorted range), eol (an insert at the end of a list of data), rId, ua, ra. Children: undo, rcc, rfmt. Because the record is a whole-row or whole-column action, the column part of a row reference and the row part of a column reference can be ignored. |
undo | Undo information for formulas that referenced deleted rows or columns (not used for inserts) | sId (sheet of the formula) or dn (defined name), mutually exclusive; r (cell of the formula); dr (the deleted range, ST_RefA); exp (ST_FormulaExpression: ref, refError, area, areaError, computedArea); index (which expression of the formula); array (array formula); nf (formula of a defined name); cs (cross-sheet move); ref3D (the expression held a sheet name); v (the formula needs the cell value). |
rm | A move of cells | source, destination (A1 ranges), sourceSheetId, sheetId, rId, ua, ra. |
ris | A sheet inserted | sheetId, name, sheetPosition (zero-based index in the sheets collection), rId, ua, ra. |
rsnm | A sheet renamed | sheetId, oldName, newName, rId, ua, ra. |
rcv | A custom view added or removed | guid, action (add or delete; ST_RevisionAction; required). |
rdn | A defined-name change | New values: name, localSheetId, customView (boolean: the name belongs to a custom view), comment, customMenu, description, help, statusBar, shortcutKey, hidden, function, functionGroupId; the old values: oldComment, oldCustomMenu, oldDescription, oldHelp, oldStatusBar, oldShortcutKey, oldHidden, oldFunction, oldFunctionGroupId; plus rId, ua, ra. Children: the new formula and oldFormula (a name formula; the element may carry xml:space). The standard lists the function group ids as 1 Financial, 2 Date and Time, 3 Math and Trig, 4 Statistical, 5 Lookup & Reference, 6 Database, 7 Text, 8 Logical, 9 Information, 10 Commands, 11 Customizing, 12 Macro Control, 13 DDE/External, 14 User Defined, 15 Engineering, and then a second entry for Cube that also carries the number 14 (that is how the standard prints the table). |
rcmt | A cell comment change | sheetId, cell, guid, action (add or delete, default add), author, alwaysShow, hiddenRow, hiddenColumn, oldLength, newLength, old (ignorable: the original comment came from a legacy application). |
rqt | A query table field change | ref (the query table), sheetId, fieldId (the field that was removed). |
rcft | A merge conflict | sheetId, rId, ua, ra. |
Excel: revisions (18.11)
| Element ([MS-OI29500]) | Excel does |
|---|---|
header (2.1.804) | maxSheetId is at most 32767; userName is 1 to 54 characters; minRId defaults to 0 and is at most 2147483647; maxRId defaults to minRId and lies between minRId and 2147483647. |
headers (2.1.805) | lastGuid defaults to guid; preserveHistory is 0 to 32K; protected is true when the tracking must not be removed (the standard says the reverse: true when it can be removed, which is the opposite reading of the same attribute); revisionId is at most 2147483647; version is 1 to 2147483647; guid must not be the null GUID. |
nc, oc (2.1.806, 807) | cm, s and vm must be 0 and ph false; t is limited to b, e, inlineStr or n; r is required, and the r of oc must match that of nc; the v child is at most 32767 characters. |
oldFormula (2.1.808) | Follows the name-formula grammar (3.2.3.1.4 of the notes); xml:space is allowed and decides how white space is kept. |
raf (2.1.809) | sheetId at most 32767; autoFormatId below 21 for raf and queryTable (for pivot tables below 21, or above 4096 and up to 4117). |
rcc (2.1.810) | sId at most 32767; numFmtId defaults to 0; s may be used for operations other than undo (the standard says only for undo). |
rcft (2.1.811), rfmt (2.1.815) | sheetId is 0 to 32767. For rfmt: length is under 32767 for part of a string or 2147483647 for the whole string; either length is 2147483647 and start is 0, or start plus length is under 32767; start and length are omitted when a built-in or custom format is applied to the sqref. |
rcmt (2.1.812) | author is 1 to 52 characters; guid ties the record to a comment in a worksheet. |
rdn (2.1.813) | localSheetId at most 32767; the text attributes customMenu, oldCustomMenu, description, oldDescription, help, oldHelp, statusBar, oldStatusBar at most 32767 characters; comment and oldComment at most 255; the formula is a name formula; name is unique within its collection and a valid defined name; rId at most 2147483647. |
reviewed (2.1.814) | rId at most 2147483647; revision records always appear in increasing order of revision id within a shared workbooks part. |
ris (2.1.816) | sheetId at most 32767; sheetPosition at most 65533; name has the form [Book]SheetName. |
rm (2.1.817) | sheetId and sourceSheetId at most 32767; source and destination have equal width and height. |
rqt (2.1.818) | The note restricts a value named version to at most 32767, although the element has no such attribute; the standard’s attribute is sheetId (the note appears to mean that one). |
rrc (2.1.819) | sId at most 32767. |
rsnm (2.1.820) | sheetId at most 32767; oldName and newName have the form [Book]SheetName. |
sheetId, sheetIdMap (2.1.821, 822) | val at most 65535; at most 65535 sheetId children. |
undo (2.1.823) | sId at most 32767; array and v are never both true; with exp equal to ref or refError, dr is a single cell; if nf is true then ref3D is false and exp is neither refError nor areaError; if ref3D is true, exp is not computedArea; dn excludes both r and sId; index is below the number of expressions in the formula; Excel also uses undo for moves of rows and columns. |
users (2.1.824) | count at most 256. |
Query tables (18.12)
A query table is a two-dimensional table bound to an external query: a text file, a web query or a
database query. One queryTable part (CT_QueryTable) exists per query table
object. The connection that says how to fetch the data is a separate
connection element in the workbook, named by connectionId. Children, in order:
queryTableRefresh (optional) and extLst. A text-import query table in the
standard’s example has no children at all.
| Element | Attributes and meaning |
|---|---|
queryTable | name; connectionId (the external connection used to refresh); headers (the first row holds column titles); rowNumbers (a first column of row numbers); disableRefresh (when true the query table is not refreshable); backgroundRefresh; firstBackgroundRefresh (true when the very first background refresh had not finished at save); refreshOnLoad; removeDataOnSave (remove all data before saving, so that people with different permissions re-query with their own credentials); disableEdit (the connection is not editable); preserveFormatting (keep formatting and copy it to new rows); adjustColumnWidth; intermediate (defined but not yet fully formed or filled; fields and ranges can be unknown); growShrinkType (ST_GrowShrinkType, how a changing number of rows is handled: insertDelete, insertClear, overwriteClear); fillFormulas (formulas in adjacent columns are filled down on refresh); and the legacy auto-format group autoFormatId with applyNumberFormats, applyBorderFormats, applyFontFormats, applyPatternFormats, applyAlignmentFormats and applyWidthHeightFormats. |
queryTableRefresh | Children, in order: queryTableFields (required), queryTableDeletedFields, sortState, extLst. Attributes: nextId (next unused field id), fieldIdWrapped (whether nextId wrapped around), headersInLastRefresh, minimumVersion (the lowest application version expected to refresh the table correctly; an older application should warn the user before refreshing), preserveSortFilterLayout (when false, the table may be rebuilt on refresh and user-deleted or rearranged columns, user-inserted unbound columns and column formatting are lost), unboundColumnsLeft and unboundColumnsRight (extra columns not bound to external data). |
queryTableFields / queryTableField | count (columns, query-defined and user-defined, not deleted ones). A field has id, name, tableColumnId (the table column when the query table is attached to a table object), dataBound (false for a user-defined column, which must survive refresh; supported only when attached to a table), rowNumbers (the column holds row numbers), fillFormulas (fill this column’s formula down on refresh) and clipped (the field is not visible because the query table sits near the edge of the sheet or another object that cannot be overwritten). |
queryTableDeletedFields / deletedField | count; each deletedField has a name. |
The standard’s database example is name="Northwind Orders", connectionId="1",
growShrinkType="overwriteClear" and 12 fields; a connection with the same name elsewhere in the file says how to reach the database.
Excel’s notes are in the next section.
Excel: query tables (18.12)
| Element ([MS-OI29500]) | Excel does |
|---|---|
deletedField (2.1.825) | name is 1 to 255 characters. |
queryTable (2.1.826) | If firstBackgroundRefresh is true then backgroundRefresh is also true; name is unique, non-empty and under 256 characters; connectionId is greater than 0 and names a valid connection; a defined name equal to name (spaces turned into underscores for the comparison) gives the range of the query table, and when the query table belongs to a table, that defined name refers to the same range as the table; removeDataOnSave is ignored if refreshOnLoad is false; autoFormatId rules as for raf (below 21). |
queryTableField (2.1.827) | tableColumnId is 0 when the query table is attached to a plain range; name is 0 to 255 characters; clipped true requires dataBound true; fillFormulas true requires dataBound false; rowNumbers true requires dataBound true. |
queryTableRefresh (2.1.828) | unboundColumnsLeft and unboundColumnsRight are under 16384; nextId is at most 65535; when fieldIdWrapped (the note spells it fieldWrappedId) is false every field id is below nextId; minimumVersion is 0 to 31. |
External data connections (18.13)
The connections part (xl/connections.xml) holds top-level
connection objects that say how to fetch external data. They are independent of the things
that show the data (tables, pivot tables, query tables, CUBE formulas), which point to them by
id. A connection holds both its definition and how the workbook uses it. The command text
and connection string are stored as given by the data provider: the application need not understand
their syntax. A connection can also live in a standalone file (odcFile); the standard
describes only the embedded form. A connection has at most one of each child, in this order:
dbPr, olapPr, webPr, textPr, parameters,
extLst.
connection
| Attribute | Meaning |
|---|---|
id, name, description | Unique id, unique name, user description. A deleted connection keeps only name and deleted="1"; adding a new connection of the same name replaces it. |
type | 1 ODBC; 2 DAO; 3 an application-defined connection file; 4 web query; 5 OLE DB; 6 text; 7 ADO; 8 DSP. The standard calls 2, 3, 5, 7 and 8 “custom data connection source” (application-defined technologies) and gives the Office meanings (DAO 2, connection file 3, OLE DB 5, ADO 7, DSP 8) as a note. |
refreshedVersion, minRefreshableVersion | Backward-compatibility version numbers: the version that last refreshed the connection and the lowest that can refresh it correctly (unsignedByte). |
refreshOnLoad, background, interval, keepAlive, new | Refresh when opening; prefer refreshing in the background (ignored in some cases: an Analysis Services connection used by both a pivot table and CUBE functions is always refreshed synchronously by the pivot table and asynchronously by the functions); minutes between automatic refreshes (absent means never); keep the connection open (the MaintainConnection property of a pivot cache); the connection has not yet been refreshed for the first time. |
saveData, savePassword, credentials | Store the fetched data in the workbook (so that current credentials are required every time and others do not see the author’s last data); store the password in the connection string; the authentication method (ST_CredMethod: integrated, none, stored, prompt). |
singleSignOnId | Identifier of single sign-on used between an intermediate server and the data source. |
odcFile, sourceFile, onlyUseConnectionFile, reconnectionMethod | Path or URI of the external connection file; the file-based data source tried directly when a connection fails; always and only use the connection file (ODBC and custom connections only); what to do when a connection fails: 1 use the existing information and fall back to the file if it cannot connect, 2 always take the information from the file (refresh fails if the file is missing), 3 never take it from the file. |
Child elements
| Element | Attributes and meaning |
|---|---|
dbPr | ODBC and OLE DB properties: connection (connection string), command (command text, passed to the provider; ODBC ? marks a parameter), commandType (custom sources pass it on; for OLE DB: 1 cube name, 2 SQL statement, 3 table name, 4 default information, interpretation left to the provider, 5 web-based list data provider), serverCommand (a second, usually broader command kept when pivot server-based page fields are used, for building parameter UI). The standard’s example is an OLE DB connection to a Northwind database with commandType="3". |
olapPr | An OLAP connection holds both dbPr and olapPr. Attributes: local (use a local cube instead of the server), localConnection (its connection string), localRefresh (rebuild the local cube on every user refresh), rowDrillCount (maximum drill-through rows), sendLocale (send the UI locale id to the provider), serverFill, serverFont, serverFontColor, serverNumberFormat (pivot cells use the fill, font, font colour and number format from the OLAP source when true). |
parameters / parameter | For ODBC and web queries. parameters@count; a parameter has name, parameterType (ST_ParameterType: prompt asks the user using prompt; value uses exactly one of boolean, double, integer, string; cell reads the cell named by cell, such as Sheet1!$C$1), refreshOnChange (refresh when the cell changes) and sqlType (ODBC only; ISO 9075-3:2008 Table 33 concise type codes). |
textPr | Text import. sourceFile, prompt (ask for the file name on refresh; true or absent asks), firstRow (row to start at; default 1), delimited (true for tab or character delimited, false for fixed-width), the delimiter flags tab (true or absent), comma, semicolon, space, delimiter (one custom character), consecutive (merge consecutive delimiters), qualifier (ST_Qualifier: doubleQuote, singleQuote, none), decimal and thousands (one character each, used when the file’s separators differ from the computer’s), characterSet (an IANA character set name; when absent codePage, default 1252, is used) and fileType (ST_FileType: mac, win, dos, lin, other; ignorable; only one of fileType, characterSet and codePage). Child textFields (count) holds textField elements with position (0-based start for fixed-width fields) and type (ST_ExternalConnectionType: general, text, MDY, DMY, YMD, MYD, DYM, YDM, skip, EMD). The standard tabulates the import of 123.123,45 and 123,123.45 under four combinations of system and file separators: the text is numeric when the file separators are the usual pair for that system or differ from it consistently, and stays text when file and system use the same character for decimal and thousands. |
webPr | Web query. url, post (the string sent with the HTTP post method), editPage (the user-facing page, kept when sourceData and the url was redirected to an XML file), sourceData (import the XML source named by the table’s o:WebQuerySourceHRef instead of the HTML table), xml (the source is XML), htmlTables (only HTML tables), htmlFormat (ST_HtmlFmt: none, rtf, all), parsePre, firstRow (parse tables inside a PRE block with the width settings of the first row), consecutive, textDates (dates as text), xl97 and xl2000 (compatibility flags that may be ignored). Child tables (count) holds s elements (v is the id of the HTML table), or x elements giving the table by its index; m is present when tables of the web query are missing. |
Excel: connections (18.13)
| Element ([MS-OI29500]) | Excel does |
|---|---|
connection (2.1.829) | interval 0 also means no automatic refresh; interval at most 32767; name is required, 1 to 255 characters; type is required; types 8 and 9 are treated as reserved and unused, and Office does not use 3 (the standard describes 3 as a file-based source); description, singleSignOnId, odcFile and sourceFile at most 255 characters; reconnectionMethod is ignored when onlyUseConnectionFile is true; refreshedVersion and minRefreshableVersion apply to pivot caches as well as query tables; saveData is used only for query tables and ignored for pivot tables, and when it is false, refreshOnLoad must be true. |
dbPr (2.1.830) | connection at most 65535 characters. |
olapPr (2.1.831) | localConnection is required when local is true; rowDrillCount is 1 to 1048576. |
parameter (2.1.832) | cell is a non-empty formula (ST_Formula), required when parameterType is cell; name and string at most 255 characters; prompt at most 65535. |
s (2.1.833) | Used for an HTML table name as a child of tables (v at most 255 characters) and also as a child of metadataStrings (v at most 65535). |
textField, textFields (2.1.834, 835) | Each position is at least that of the previous field, in the range 0 to 2147483647; at most 2001 fields. |
textPr (2.1.836) | The delimiter flags are ignored when delimited is false; firstRow at most 2147483647; decimal and thousands are one character with an ANSI value up to 255; textFields is required; sourceFile is 1 to 218 characters, has no default, and is required when prompt is false; the table of the standard differs in one case: Office imports 123,123.45 as text when both the system and the file have comma as decimal and period as thousands separator; in Office 2010 and 2010 SP1 characterSet is ignored and codePage is used even when characterSet is present (the standard says codePage is ignored then). |
webPr (2.1.837) | The XML source of sourceData is the URL named by WebQuerySourceHRef in the HTML; url cannot be empty and is at most 230 characters; with xml true and the parent connection not deleted, a non-empty url is required; with xml false url is required when the connection is not deleted and absent otherwise. |
External links (18.14)
An external workbook, DDE server or linked object that formulas refer to is stored in
xl/externalLinks/externalLinkN.xml. The target is in that part’s relationships file
(type externalLinkPath, TargetMode="External"), so external resources can be
found without parsing the XML. The root externalLink holds exactly one of
externalBook, ddeLink or oleLink (per sml.xsd each is optional, at
most once), then an optional extLst. Formulas of external cells are never stored; only cached
values are.
| Element | Attributes and meaning |
|---|---|
externalBook | r:id (required) names the relationship whose target is the external workbook. Children in order: sheetNames (sheetName@val, required), definedNames (definedName: name required, refersTo, sheetId for names scoped to one sheet), sheetDataSet. |
sheetData | sheetId (required; the standard says 1-based index of the external sheet), refreshError (last refresh failed). Holds row (r required) elements of cell elements. |
cell (external) | r location in the external book, t (ST_CellType; here never inlineStr, no rich text), vm value metadata index; child v. |
ddeLink | ddeService and ddeTopic (both required): the DDE application and, usually, a document of it. Child ddeItems of ddeItem: name (required), advise (server notifies on change; default false), ole (uses an object linking technology; default false), preferPic (data is an image; default false). A ddeItem may hold values (rows, cols, both default 1) of value elements (t ST_DdeValueType nil, b, n, e, str; default n) each with one val. The standard’s examples use Excel as the DDE server (ddeTopic="[ddesource.xls]Sheet1") and a price server whose items carry cached values. |
oleLink | r:id (the relationship target is the external file; required) and progId (required): for an OLE link the ProgID of the object, for a KParts link the plugin library. Child oleItems of oleItem: name, icon, advise, preferPic. The standard’s examples are a Bonobo widget (target defines the object) and a KParts plugin whose target follows the kpartgui DTD. |
Excel: external links (18.14)
| Element ([MS-OI29500]) | Excel does |
|---|---|
cell (2.1.838) | t must not be s; vm is a one-based index into the valueMetadata collection of the metadata part; r is required and must lie in the row of the parent row. |
ddeItem (2.1.839) | name is 1 to 255 characters; with ole true the name should be StdDocumentName (the item supplies the name of the data source topic). |
ddeLink (2.1.840) | ddeService is 1 to 255 characters, ddeTopic at most 255, the two together under 255, and joined they hold at most one bracket pair with the opening bracket first. |
definedName (2.1.841) | name must be a valid defined name; refersTo must be a valid formula limited to cell references within the same external book; sheetId is 0 to 65533. |
externalLink (2.1.842) | An extLst may follow externalBook, ddeLink or oleLink (the standard calls them mutually exclusive); one of the three is required (the standard allows an empty link). |
oleItem, oleLink (2.1.843, 844) | oleItem@name is 1 to 255 characters (zero length files do not open); progId is 1 to 255 and, with the relationship target, at most 254 combined. |
row, sheetData (2.1.845, 846) | r at most 1048576; sheetId 0 to 65533 (the standard says 1-based); rows must be in ascending order. |
sheetName, sheetNames (2.1.847, 848) | val is expected at most 31 characters, enforced on load (on save some cases write up to 252); at most 65534 sheetName elements. |
val, value, values (2.1.849 to 851) | val at most 32767 characters and takes xml:space; cols is 1 to 16384, rows 1 to 1048576; the number of value elements must equal rows times cols, in row-major order. |
Volatile dependencies (18.15)
The volatileDependencies part (root volTypes) caches the last values and the
parameters of Real Time Data (RTD) and CUBE functions, plus their server and connection names, so a
workbook can recalculate from the cache when the server is unavailable. There is one such part per
workbook, and it may hold several dependency types.
| Element | Meaning |
|---|---|
volType@type | ST_VolDepType: realTimeData or olapFunctions (required). Holds one or more main. |
main@first | The first argument shared by all topics under it: for RTD the ProgID of the RTD server (for example jrtdx.rtd), for CUBE functions the connection name (the standard’s example is xlextdat9 Adventure Works DW Adventure Works). Holds tp elements. |
tp (topic) | t ST_VolValueType: b, n (default), e, s; the type of the cached value, which may be ignored for CUBE when stp is 1. Children in order: v (the value), zero or more stp, one or more tr. |
stp | Each remaining argument of the call after the first (for the topic {"progid","","foo"} two: "" and "foo"). For CUBE functions the value 1 says every related cell has been refreshed. |
tr | A cell that depends on the topic: r (cell reference) and s (sheet index), both required in the schema example and scoped together. |
Excel: volatile dependencies (MS-OI29500 2.1.852 to 855)
main@first is 1 to 255 characters; stp at most 255 characters and takes xml:space. Excel reads stp 0 in a CUBE topic as “not all related cells have been refreshed”, and requires exactly one stp per CUBE function. For RTD, the first stp being empty means the add-in runs on the local machine, any other value is the server name, and later ones are the topics. tp/v is at most 32767 characters. tr@s is 1 to 65534.
Custom XML mappings (18.16)
The xmlMaps part (root MapInfo, xl/xmlMaps.xml) lets arbitrary XML structures be bound to table columns, cell ranges or single cells, so the workbook can import and export XML instances. The standard does not require a particular schema language (it lists W3C XML Schema, RELAX NG, Schematron and NVDL as examples). A copy of each schema is kept in the workbook; each added instance or schema creates a new map.
| Element | Attributes |
|---|---|
MapInfo | SelectionNamespaces: space-separated namespace declarations used when XPath expressions have to be written against instances (prefixes instead of full namespaces). Holds Schema and Map elements. |
Schema | ID (unique name, for example Schema1), Namespace, SchemaLanguage (a media type token such as application/relax-ng-compact-syntax), SchemaRef (relative path of a root schema file that includes others contributing to the same namespace). The content is the schema itself, in the standard’s example an xsd:schema. |
Map | ID, Name, RootElement, SchemaID (the Schema used), ShowImportExportValidationErrors, AutoFit (resize columns after refresh), Append (append to rather than overwrite the mapped table), PreserveSortAFLayout (keep the filter and sort state), PreserveFormat (keep the sheet’s number formats rather than those of the XML data type). Child DataBinding. |
DataBinding | ConnectionID (a connection in the connections part; required when FileBinding is true), FileBinding (data comes directly from an XML file whose path is in the connection), DataBindingName and FileBindingName (each unique per binding), DataBindingLoadMode: 0 None, 1 Normal, 2 Delay Load, 3 Asynchronous, 4 Object Model. |
The map is referred to from elsewhere: a table of tableType="xml" carries connectionId, and each tableColumn has an xmlColumnPr with mapId, xpath and xmlDataType (for example /Root/EmployeeInfo/Name, string). A cell mapped alone is described in the single cells part by singleXmlCell (with r, connectionId) holding xmlCellPr and xmlPr with the same three attributes. In the standard’s example the XPath of an attribute is /Root/@Currency.
Excel: XML maps (MS-OI29500 2.1.856 to 858)
DataBinding: FileBinding defaults to false and must be written true or false; ConnectionID must equal an id in the connections collection, is at most 2147483647, and is present only when FileBinding is true; FileBindingName must be absent when FileBinding is false; the two names are at most 65535 characters. Map: the four booleans must be written true or false, not 1 or 0; Name and RootElement are under 65536 characters; ID is 1 to 2147483647. Schema: ID, SchemaRef and Namespace at most 65535 characters; Excel ignores SchemaLanguage and assumes W3C XML Schema (application/xml) for every map; it ignores the mixed attribute on the schema element. Program differences beyond Excel (LibreOffice Calc, Apache POI, ClosedXML) are not described on this page.
Excel: where it differs from the standard
| Element ([MS-OI29500]) | Excel does |
|---|---|
bk (2.1.722) | The rc children must be stored in strictly increasing order of their metadata type index; the standard sets no order. |
cellMetadata, valueMetadata, futureMetadata, mdxMetadata, metadataTypes, metadataStrings (2.1.723, 724, 727, 728, 730, 736) | count is at most 2147483647 (the standard allows any unsigned int). |
futureMetadata (2.1.724) | The name must equal the name of one metadataType, be unique among the futureMetadata records, be non-empty and at most 65535 characters, and must not be XLMDX. Names beginning with XL are reserved by Excel. |
k (2.1.725) | n and np are zero-based indexes into the metadataStrings collection, at most 2147483647. |
mdx, n, p (2.1.726, 732, 733) | mdx@n, n@x, p@n and p@np are at most 2147483647. |
ms (2.1.731) | ns and c are between 0 and 2147483647. |
rc (2.1.734) | t is at most 2147483647. |
t tuple (2.1.735) | ct must not be present if si or fi is; si and c are at most 2147483647; si is a zero-based index to a metadata string; fi is at most 58. |
metadataType flags (2.1.729 a to t) | Excel does not respect the values of adjust, assign, clearAll, clearComments, clearContents, coerce, ghostCol, ghostRow, merge, pasteAll, pasteBorders, pasteColWidths, pasteComments, pasteDataValidation, pasteFormats, pasteFormulas, pasteNumberFormats, rowColShift, splitAll and splitFirst. |
metadataType name (2.1.729 u to ww) | name is non-empty, at most 65535 characters, and XLMDX for MDX metadata (never for future metadata). For XLMDX, minSupportedVersion must be 120000. Also for XLMDX: assign, clearComments, clearFormats, coerce, copy, merge, pasteAll, pasteValues, rowColShift and splitFirst must be true; adjust, cellMeta, clearAll, clearContents, delete, edit, ghostCol, ghostRow, pasteBorders, pasteColWidths, pasteComments, pasteDataValidation, pasteFormats, pasteFormulas, pasteNumberFormats and splitAll must not be true. |
Not described on this page
Known, not yet covered
- Reference: the behaviour of LibreOffice Calc, Apache POI and ClosedXML for the parts of 18.11 to 18.16 (revisions, query tables, connections, external links, volatile dependencies, XML maps) is not described; only the standard and Excel’s notes are.
- Reference: the OLAP details of 18.10 beyond the pivots page.
- Viewer: the metadata part is not decoded; the viewer lists it as a part only.
Sources
- ECMA-376 5th edition Part 1 section 18.9 and 18.18.44 to 18.18.46, in the project’s research/ooxml/ecma376/p1/part1.txt (lines 66266 to 66907 and 91512 to 91566)
- [MS-OI29500] v20260818, research/ooxml/ms/MS-OI29500.txt, notes 2.1.722 to 2.1.736 (lines 14275 to 14773)
- ECMA-376 5th edition Part 1 sections 18.11 to 18.16 (part1.txt lines 72348 to 75702)
- [MS-OI29500] v20260818, notes 2.1.804 to 2.1.858 (lines 16510 to 17194)
- ECMA-376 Part 4 sml.xsd (Transitional)