Workbook elements the xlsx core leaves in
_extras: the stylesheet's slicer and timeline styles andcolors, a font'soutline/shadow/condense/extend, a dxf'sprotection, a table column'sxmlColumnPrandcalculatedColumnFormula. An xlsx walker extension, inxlsx-full.
Module smlWorkbookDetails | Source packages/front/office/ooxml/src/extra/sml-workbook-details.js | Deps xml, docxProperties | Worker-safe yes
Registered through xlsx-full, or with xlsx.use(...), it types those elements on hydrateWorkbook and writes them back on dehydrateWorkbook. Each one is typed only when it is written back as read (docxProperties.hydrateLossless). A bag (the stylesheet, a font, a dxf, a table column) is typed only when its untyping gives back its _extras in their order; any other element stays in _extras.
Resolve
const ext = runtime.resolve('smlWorkbookDetails');
// Returns the walker hooks: hydrateWorkbook / dehydrateWorkbook.
Fields typed
| Where | Field | From |
|---|---|---|
workbook.styles |
slicerStyles: { default?, styles?: [{ name, elements?: [{ type, dxfId? }] }] } |
the stylesheet's extLst, extension x14:slicerStyles |
workbook.styles |
timelineStyles (same shape) |
the stylesheet's extLst, extension x15:timelineStyles |
workbook.styles |
colors: { indexed?: ['AARRGGBB'], mru?: [{ rgb?, theme?, tint?, … }] } |
<colors> |
a font (styles.fonts[], styles.dxfs[].font) |
condense, extend, outline, shadow (booleans) |
<condense> … (no val is true) |
a dxf (styles.dxfs[]) |
protection: { locked?, hidden? } |
<protection> |
a table column (tables[].columns[]) |
calculatedColumnFormula: { formula, array? } |
<calculatedColumnFormula> |
| a table column | xmlColumnPr: { mapId, xpath, xmlDataType, denormalized? } |
<xmlColumnPr> |
The stylesheet's extLst is typed only when it holds those two extensions alone, in that order, each declaring its namespace.
Notes
- Left raw in the wild corpus: a
<colors>holdingthemeColors(an Excel 2007 beta element), a drawing's shape properties, and a conditional-formatting rule'sextLst. - A drawing's text is typed by
dmlTextDetails, whichxlsx-fullalso registers: the xlsx walker reaches each drawing's text body. - Why only
xlsx-full. Adding these fields toxlsx-largewould change what its readers find in_extras.
See also
- xlsxWalker — the hooks and what they visit.
- xlsxStyles, xlsxTables — the core models these fields extend.