Attribute names, types, defaults and enumeration values on this page are from the Transitional
schema sml.xsd (ECMA-376 5th edition Part 4); meanings are from the prose of Part 1
chapter 18. Excel: notes are from [MS-OI29500] v20260818, section 2.1.
Every attribute is optional unless marked required. Where the text of Part 1 gives no meaning
that could be read from the text copy, only the name and default are listed.
Workbook level (xl/workbook.xml)
workbookPr (18.2.28)
| Attribute | Default | Note |
|---|---|---|
date1904 | false | the 1904 date system |
showObjects | all | all, placeholders, none |
showBorderUnselectedTables | true | Excel draws no border round unselected tables whatever the value ([MS-OI29500] 2.1.585 i) |
filterPrivacy | false | Excel uses it to decide whether personal information is removed on save (2.1.585 h) |
promptedSolutions, backupFile, publishItems, checkCompatibility, allowRefreshQuery | false | Excel does not support allowRefreshQuery on this element (2.1.585 a) |
showInkAnnotation, saveExternalLinkValues, autoCompressPictures | true | |
updateLinks | userSet | userSet, never, always |
codeName | the standard: the code name of the creating application. Excel: the name of the Workbook object for scripting, at most 31 characters (2.1.585 c, d) | |
hidePivotFieldList, showPivotChartFilter, refreshAllConnections | false | The standard says 1 for hidePivotFieldList shows the field list; Excel treats 1 as hidden (2.1.585 e). refreshAllConnections 1: refresh all connections (2.1.585 f) |
defaultThemeVersion | none | Excel: 0, no default theme (2.1.585 b) |
dateCompatibility (Strict) | Excel ignores it; with workbook@conformance="strict" the 1900 date system is used, otherwise the 1900 compatibility system; negative serial numbers are not supported (2.1.585 g, j) |
workbook itself has conformance (Excel ignores it, 2.1.584 b). Excel cannot print a file with no bookViews element (2.1.584 a). The children are
fileVersion, fileSharing, workbookPr,
workbookProtection, bookViews, sheets,
functionGroups, externalReferences, definedNames,
calcPr, oleSize, customWorkbookViews,
pivotCaches, smartTagPr, smartTagTypes,
webPublishing, fileRecoveryPr, webPublishObjects,
extLst.
sheets and sheet (18.2.19, 18.2.20)
Excel ([MS-OI29500] 2.1.578, 2.1.579): a sheet name is at most 31
characters, follows the sheet-name rules of 18.17, and names are unique ignoring case in any locale;
sheetId is 1 to 65534; id (the relationship id) is at most 255
characters; at most 32767 sheets. state is visible,
hidden or veryHidden.
bookViews and workbookView (18.2.1)
| Attribute | Default |
|---|---|
visibility | visible (visible, hidden, veryHidden) |
minimized | false |
showHorizontalScroll, showVerticalScroll, showSheetTabs, autoFilterDateGrouping | true |
xWindow, yWindow (int), windowWidth, windowHeight | none (the window position and size; Excel does not require width and height, 2.1.566 i, j) |
tabRatio | 600; Excel: at most 1000 (2.1.566 c) |
firstSheet, activeTab | 0 |
calcPr (18.2.2)
| Attribute | Default | Note |
|---|---|---|
calcId | none | version of the calculation engine that computed the values; a workbook from an earlier engine is fully recalculated on load. Excel: 0 if absent (2.1.565 c) |
calcMode | auto | manual, auto, autoNoTable |
fullCalcOnLoad | false | |
refMode | A1 | A1 or R1C1 reference style |
iterate, iterateCount (100), iterateDelta (0.001) | false | The standard says the iterations always take place; Office stops when values change by less than iterateDelta (2.1.565 b) |
fullPrecision, calcCompleted, calcOnSave, concurrentCalc | true | calcCompleted: whether the data was recalculated before the save; calcOnSave: whether it is recalculated when saving |
concurrentManualCount | none | |
forceFullCalc | none | Excel: false (2.1.565 a) |
fileVersion, fileSharing (18.2.13, 18.2.12)
fileVersion: appName, lastEdited, lowestEdited,
rupBuild (strings) and codeName (a GUID). Office: each
string is at most 65535 characters; when appName is xl the other three
are unsigned integers at most 32767 (2.1.574). fileSharing:
readOnlyRecommended (false), userName, reservationPassword
(a 16-bit hash in hex) or the hash set algorithmName, hashValue,
saltValue, spinCount. Office requires
userName (1 to 54 characters) when a reservation password exists (2.1.573). The
reserved algorithm names are MD2, MD4, MD5, RIPEMD-128, RIPEMD-160, SHA-1, SHA-256, SHA-384,
SHA-512 and WHIRLPOOL; the hash is run spinCount times, each result feeding the next,
on the salt followed by the password.
workbookProtection (18.2.29)
lockStructure, lockWindows, lockRevision (all false),
workbookPassword and revisionsPassword (16-bit hash in hex) with
…CharacterSet (string), and the hash sets workbookAlgorithmName,
workbookHashValue, workbookSaltValue, workbookSpinCount and
the same four with the prefix revisions. Excel ([MS-OI29500]
2.1.586 a): when every sheet’s sheetView has windowProtection false,
lockWindows is saved as false too.
Worksheet level
sheetPr (18.3.1.82) and outlinePr (18.3.1.61)
| Attribute | Default | Meaning (Part 1) |
|---|---|---|
codeName | a stable name of the sheet for code to use | |
enableFormatConditionsCalculation | true | false: colour scale and data bar minima and maxima and top-N thresholds are not updated (useful while conditional formats are set by a program) |
filterMode | false | the sheet has AutoFilters or advanced filters on |
published | true | the sheet is published |
syncHorizontal, syncVertical, syncRef | false | scroll the window to the horizontal (row) or vertical (column) part of syncRef when the window properties give no scroll position |
transitionEntry, transitionEvaluation | false | the Lotus compatibility options for formula entry and evaluation |
outlinePr: applyStyles | false | apply outline styles when an outline is applied |
summaryBelow, summaryRight | true | summary rows appear below, and summary columns to the right of, the detail |
showOutlineSymbols | true | overridden by sheetView’s attribute of the same name |
pageSetUpPr: autoPageBreaks (true), fitToPage (false) |
sheetViews, sheetView, pane, selection (18.3.1.87, 18.3.1.66, 18.3.1.78)
When several sheetView elements are present, each is a window with the same
workbookViewId (required, the 0-based index into bookViews); of
those with the same id the last one is loaded and the others are discarded.
sheetView attribute | Default | Meaning (Part 1) |
|---|---|---|
view | normal | normal, pageBreakPreview, pageLayout |
showFormulas | false | show formulas instead of values |
showGridLines, showRowColHeaders, showZeros, showRuler, showOutlineSymbols, showWhiteSpace, defaultGridColor | true | showZeros false: zero-valued cells appear blank. showRuler and showWhiteSpace apply in page layout view (white space: the margins and header and footer areas). showOutlineSymbols overrides outlinePr. defaultGridColor overrides colorId |
rightToLeft | false | column A is at the far right and cell contents are shown right to left |
tabSelected, windowProtection | false | several sheets can be selected, only one is active; windowProtection: the panes are locked because the workbook structure is protected |
topLeftCell | top left visible cell of the bottom right pane (left to right mode) | |
colorId | 64 | index colour of the headings and grid lines. Excel uses it for grid lines only and allows at most 64 (2.1.655) |
zoomScale (100), zoomScaleNormal, zoomScaleSheetLayoutView, zoomScalePageLayoutView (0) | percent, 10 to 400, for the current, normal, page break preview and page layout views |
pane: xSplit, ySplit (double, 0), in 1/20 of a point, or, when
the pane is frozen, the number of columns and rows in the top and left panes;
topLeftCell; activePane (topLeft default,
bottomRight, topRight, bottomLeft); state
(split default, frozen, frozenSplit).
selection (up to 4): pane (topLeft), activeCell,
activeCellId (0), sqref (A1). pivotSelection
(up to 4) selects a pivot table area.
sheetFormatPr and cols (18.3.1.81, 18.3.1.13)
sheetFormatPr: defaultRowHeight (double, required),
baseColWidth (8), defaultColWidth, customHeight,
zeroHeight, thickTop, thickBottom
(all false), outlineLevelRow, outlineLevelCol (0, unsigned byte).
Excel ([MS-OI29500] 2.1.598, 2.1.644): for col, min and
max are 1 to 16384, width 0 to 255, style 0 to 65429,
outlineLevel at most 7, and the stored width is
Truncate(((NoC * MDW + PP) + ((NoC * MDW + PP) MOD 8) - PP) / MDW * 256) / 256 with NoC the
number of characters, MDW the maximum digit width and PP the padding (the standard gives a
different formula: characters times digit width plus 2 pixels of padding on each side plus 1 for
the grid line). For row: r is 1 to 1048576 in non-decreasing order,
outlineLevel 0 to 7, s 0 to 65490.
sheetProtection and protectedRanges (18.3.1.85, 18.3.1.71)
sheetProtection has the legacy 16-bit hash password or the hash set
algorithmName, hashValue, saltValue,
spinCount, and these flags. For autoFilter,
deleteColumns and deleteRows the text says a value of 1 means the action
is not allowed while the sheet is protected; the text for the other flags was not read
line by line, and the page assumes the same meaning:
| Default false | Default true |
|---|---|
sheet (the sheet is protected), objects, scenarios, selectLockedCells, selectUnlockedCells | formatCells, formatColumns, formatRows, insertColumns, insertRows, insertHyperlinks, deleteColumns, deleteRows, sort, autoFilter, pivotTables |
protectedRange: sqref and name required, the same password
or hash attributes, and a securityDescriptor (an attribute and a child element of
type string).
scenarios (18.3.1.76)
scenarios: current, show (indexes), sqref; each
scenario has name (required), locked, hidden
(false), count, user, comment and one or more
inputCells: r (required), val (required),
deleted, undone (false), numFmtId. Office
includes inputCells with deleted="true" when running a scenario, which the
standard says prevents it ([MS-OI29500] 2.1.629 c).
Print options, page setup, margins, breaks
| Element | Attributes (default) |
|---|---|
printOptions | horizontalCentered, verticalCentered, headings, gridLines (false), gridLinesSet (true) |
pageMargins | left, right, top, bottom, header, footer, all required, double |
pageSetup | paperSize (1), paperHeight, paperWidth (a positive measure with a unit), scale (100), firstPageNumber (1), fitToWidth, fitToHeight (1), pageOrder (downThenOver, overThenDown), orientation (default, portrait, landscape), usePrinterDefaults (true), blackAndWhite, draft, useFirstPageNumber (false), cellComments (none, asDisplayed, atEnd), errors (displayed, blank, dash, NA), horizontalDpi, verticalDpi (600), copies (1), r:id (a relationship id) |
rowBreaks, colBreaks | count, manualBreakCount (0); brk: id, min, max (0), man (manual), pt (false) |
sheetCalcPr | fullCalcOnLoad (false) |
headerFooter (18.3.1.46)
Attributes: differentOddEven (false), differentFirst (false),
scaleWithDoc (true), alignWithMargins (true). When
differentFirst is false the first-page elements are ignored; when
differentOddEven is false the odd elements are used even if even ones exist. Children:
oddHeader, oddFooter, evenHeader, evenFooter,
firstHeader, firstFooter (text with the codes below) and
drawingHF (a relationship to the DrawingML part used for the &G
pictures; Excel ignores drawingHF, 2.1.617). Each header or footer has a
left, a centre and a right section; &L, &C or
&R begins a section, in any order, and repeated sections are concatenated. A
code stays in effect to the end of the section unless toggled.
| Code | Meaning |
|---|---|
&& | a literal & |
&n (digits) | font size in points |
&"name,type" | font name and type; - means no name; the first comma separates them; &"-,Regular" turns bold and italic off |
&B, &I, &S, &O, &H | toggle bold, italic, strikethrough, outline, shadow (default off) |
&U, &E | toggle single and double underline; if double is on, &U turns it off |
&X, &Y | toggle superscript and subscript; they exclude each other |
&K | font colour: RRGGBB, or TTSNNN a theme colour id, a sign and a tint or shade |
&P, &P+n, &P-n | current page number, optionally offset |
&N | total number of pages |
&D, &T | current date and time |
&A, &F, &Z | sheet tab name, workbook file name, workbook file path |
&G | a drawing object (from drawingHF) |
The values the codes produce can be localised; when a locale is not supported the text is still used and only the formatting is dropped.
ignoredErrors (18.3.1.50)
Each ignoredError has sqref (required) and the flags
evalError, twoDigitTextYear, numberStoredAsText,
formula, formulaRange, unlockedFormula,
emptyCellReference, listDataValidation, calculatedColumn,
all false. Excel: at most 9 ignoredError elements, and
sqref at most 2147483647 items (2.1.627, 2.1.628).
Other worksheet elements
dataConsolidate (function default sum, with
average, count, countNums, max,
min, product, stdDev, stdDevp,
var, varp; leftLabels, topLabels,
link; dataRefs of dataRef with ref,
name, sheet, r:id). The standard names the label flag
startLabels; Excel uses leftLabels (2.1.612 a).
customSheetViews holds customSheetView elements, each with a required
guid and per-view copies of the pane, selection, breaks, margins, print options, page
setup, header and footer and auto filter, with flags such as showPageBreaks,
showFormulas, showGridLines, showRowCol,
outlineSymbols, zeroValues, fitToPage,
printArea, filter, showAutoFilter,
hiddenRows, hiddenColumns, filterUnique,
showRuler, plus scale (100), colorId (64),
state, view and topLeftCell. The elements
cellWatches, smartTags, customProperties,
oleObjects, controls, webPublishItems,
picture (a background image through r:id) and
legacyDrawingHF are listed in the worksheet’s child order on
Cells, strings and styles.
Excel ignores drawingHF in a worksheet and a chart sheet (2.1.597,
2.1.662).
Sources
- ECMA-376 5th edition (December 2016) Part 1 text 18.2.2, 18.3.1.37, 18.3.1.46, 18.3.1.61, 18.3.1.66, 18.3.1.82, 18.3.1.85, 18.3.1.87, and Part 4 Transitional
sml.xsd(research/ooxml/ecma376/) - [MS-OI29500] v20260818, 2.1.564 to 2.1.586, 2.1.598, 2.1.617, 2.1.627 to 2.1.629, 2.1.644, 2.1.655, 2.1.662 (research/ooxml/ms/)