Expand description
Everything from excel_ooxml — reading and writing .xlsx.
Structs§
- Auto
Filter Column - One column’s filter criteria within a
Sheet::auto_filter_range(<filterColumn>/<filters>/<filter>,CT_FilterColumn/CT_Filters/CT_Filter). Only the simplest, most common filter form is modeled: a fixed list of checked/visible values —CT_Filters’sCT_CustomFilters(e.g. “greater than”),CT_Top10,CT_DynamicFilter(e.g. “this month”), andCT_ColorFilter/CT_IconFilterforms are not. - Border
- A cell’s borders (
<border>,CT_Border) — up to four edges plus an optional diagonal.Border::default()(every fieldNone/false) draws no border at all. - Border
Edge - One edge of a
Border(<left>/<right>/<top>/<bottom>/<diagonal>,CT_BorderPr): a line style plus an optional color. - Calculation
Properties - Workbook-wide calculation properties (
<calcPr>,CT_CalcPr). This crate never evaluates formulas itself (seeCellValue::Formula’s doc comment) — these settings are pure storage, telling Excel how to recalculate once the file is opened, same “storage, not evaluation” posture as a formula’s own text. - Cell
- A single cell (
<c>,CT_Cell): a value plus an optional style. - Cell
Anchor Point - One corner of a cell-anchored drawing range (
<xdr:from>/<xdr:to>,CT_Marker) — a cell reference (0-based column/row, matching this crate’s own 0-basedRow/column conventions elsewhere) plus an EMU offset within that cell, letting a picture/chart start or end partway through a cell rather than exactly on a gridline. - Cell
Comment - A comment attached to a cell (legacy
xl/comments*.xml+ VML drawing,CT_Comment). Only plain-text comments with a fixed author are modeled —CT_Comment’s rich-text (CT_REltruns) body and threaded-comment reply chains (CT_ThreadedComment, the modern Excel 365 “@mention” comment form) are out of scope. - Cell
Format - A cell’s style: a number format, basic font attributes (bold/italic/size/color), a solid background fill color, borders, and horizontal/vertical alignment.
- Cell
Hyperlink - A per-cell hyperlink (
<hyperlink>,CT_Hyperlink). - Color
Scale Stop - A
ConditionalFormattingCondition::ColorScalestop: a threshold position plus the color applied there (colors between two stops are interpolated by Excel itself, not written to the file). - Column
Setting - A single column’s width/visibility/outline setting (
<col>,CT_Col) — extended forcollapsed. - Conditional
Formatting Rule - A conditional formatting rule (
<cfRule>,CT_CfRule) applied over a cell range (<conditionalFormatting sqref="..">,CT_ConditionalFormatting). - Data
Validation Rule - A data validation rule (
<dataValidation>,CT_DataValidation) applied over a cell range (sqref). - Defined
Name - A named range/formula/constant (
<definedName>,CT_DefinedName) — unlikeConditionalFormattingRule/DataValidationRule, this is a workbook-level construct, not attached to any particularSheet, even whenlocal_sheet_idscopes it to one. - Document
Properties - Document metadata (
docProps/core.xml’s Dublin Core fields plusdocProps/app.xml’sCompany/Manager/HyperlinkBase, anddocProps/custom.xml’s user-defined properties) — extended by. Before bothcore.xml/app.xmlwere always written but always empty/boilerplate (seewriter.rs’sto_core_properties_xml/to_app_properties_xml). Only the handful of fields a real document typically carries are modeled —docProps/core.xml’slastModifiedBy/revision/created/modified/category/contentStatusare still not. - Drawing
Anchor - One cell-anchored drawing object (
<xdr:twoCellAnchor>,CT_TwoCellAnchor). - Excel
Date Time - A calendar date/time, used to build a
CellValue::Date(Cell::date) — deliberately not tied to any external date/time crate (this project’s dependency policy only forbids third-party OOXML-implementing crates, but a plain field struct is simpler still and avoids the question entirely). Only the proleptic Gregorian calendar and Excel’s default “1900 date system” are supported — the legacy “1904 date system” (an old Mac Excel option,<workbookPr date1904="1"/>) is not modeled, same “one well-defined behavior, not every historical Excel quirk” posture as elsewhere in this crate. - Excel
Table - A structured (
ListObject) table (<table>,CT_Table) — extended for per-column calculated-column formulas and totals-row functions, and fortable_style_name. - External
Workbook Link - A reference to another workbook, used by this workbook’s formulas (
<externalReference>inxl/workbook.xml’s<externalReferences>, plus a dedicatedxl/externalLinks/externalLinkN.xmlpart,CT_ExternalReference/CT_ExternalLink). Storage only: this crate neither resolves the referenced workbook nor recomputes any formula against it — a formula cell referencing this link (e.g."[1]Feuil1!A1"or"'[Budget.xlsx]Feuil1'!A1") is written/read as plain formula text like any other, this type only accounts for the link itself (the part Excel needs to know the reference is legitimate and to cache a fallback value while the other file is closed). - Freeze
Pane - Frozen panes (
<pane state="frozen">,CT_Pane). SeeSheet.freeze_panes’s doc comment for why only “frozen” (not “split”) panes are modeled. - Gradient
Fill - A cell’s linear gradient fill (
<gradientFill degree="..">,CT_GradientFill’stype="linear"form — the default, notypeattribute written). The “path” (radial) gradient form is not modeled. - Gradient
Stop - One color stop of a
GradientFill(<stop position="..">,CT_GradientStop). - Ignored
Error - A suppressed error-checking indicator over one range (
<ignoredError>,CT_IgnoredError). Confirmed againstsml.xsd(CT_IgnoredErrors/CT_IgnoredError, ECMA-376 SpreadsheetML):sqrefis the only required attribute, every error-category flag is an optional boolean defaulting tofalse. This crate models every flagCT_IgnoredErrordefines; real Excel’s own “Ignore Error” right-click menu only ever sets one flag at a time per range, but nothing in the schema forbids several flags on the same entry, so this type allows it too (caller’s choice, same “don’t second-guess the caller” posture asConditionalFormattingRule). - Message
- An input or error message attached to a
DataValidationRule(promptTitle/promptorerrorTitle/erroronCT_DataValidation). - Named
Cell Style - A named cell style (
<cellStyle>/its paired<cellStyleXfs><xf>entry,CT_CellStyle/CT_Xf), declared workbook-wide inxl/styles.xmland referenced from anyCellFormatviaCellFormat::named_style. This is Excel’s “Cell Styles” gallery: built-in entries likeGood/Bad/Neutral/Heading 1-4/Input/Output/Calculation/Currency/Percent/Comma, or a caller’s own custom-named style. Confirmed againstsml.xsd:CT_CellStyle’s only required attribute isxfId(this crate assigns it automatically, from this entry’s position inWorkbook::named_cell_styles, mirroring how adxfId/table-styledxfIdis resolved rather than caller-supplied);name/builtinIdare both optional but a real style always setsnameat least (an unnamed entry would show as blank in Excel’s gallery, sonameis required here, notOption). - Pattern
Fill - A cell’s non-solid pattern fill (
<patternFill patternType="..">,CT_PatternFill). - Print
Settings - A sheet’s print/page-setup settings.
PrintSettings::default()(everythingNone) writes no print-related XML at all. - Protected
Range - One named, independently-passworded protected range (
<protectedRange>,CT_ProtectedRange) — point 51, seeSheet::protected_ranges’s doc comment for how this differs fromSheetProtection. Confirmed againstsml.xsd:name/sqrefare the only required attributes;passworduses the same legacy 16-bit hash asSheetProtection/WorkbookProtection(seewriter.rs::legacy_password_hash’s doc comment) — the newer SHA-512algorithmName/hashValue/saltValue/spinCountform and the optionalsecurityDescriptorchild/attribute (a Windows ACL-based alternative to a password) are not modeled, same “one well-defined mechanism, not every historical Excel option” posture asSheetProtection. - Rich
Text Run - One run of a
CellValue::RichTextvalue: a span of text sharing the same character formatting (<r><rPr>..</rPr><t>..</t></r>,CT_RElt) — a deliberately scoped-down subset ofCT_RPrElt’s full run-property surface (bold/italic/color/size only, same subsetCellFormat’s own font fields already cover; underline/strike/ vertical-align/font-family are not modeled). - Row
- A single row of cells (
<row>,CT_Row). - Scenario
- A “what-if” scenario (
<scenario>,CT_Scenario). Represents one named “what if these cells held these values instead” snapshot, as managed through Excel’s own Data > What-If Analysis > Scenario Manager. This crate only stores the scenario’s definition (name/inputs/comment); it never evaluates the workbook under any scenario (same “storage, not evaluation” posture as formulas). - Sheet
- A single worksheet (
xl/worksheets/sheetN.xml,CT_Worksheet): a name (shown on Excel’s sheet tab) plus a sequence of rows. - Sheet
Chart - A chart embedded in a sheet’s drawing (
<xdr:graphicFrame>referencing a dedicatedxl/charts/chartN.xmlpart via<c:chart r:id="..">), anchored by its enclosingDrawingAnchor. Wraps the wholechart::ChartSpacethis crate’schartdependency already knows how to read/write in full — no Excel-specific chart modeling needed here, and no embedded workbook needed either (an Excel chart reads its series directly from this same workbook’s cells, via each series’ own cell-reference formulas already carried bychart::NumericDataSource/StringDataSource). - Sheet
Drawing - A sheet’s drawing (
xl/drawings/drawingN.xml,CT_Drawing/root<xdr:wsDr>) — an unbounded list of anchored pictures/charts, matching the schema’s ownEG_Anchorchoice group repeatedmaxOccurs="unbounded". - Sheet
Picture - A picture embedded in a sheet’s drawing (
<xdr:pic>,CT_Picture— the spreadsheet-drawing flavor, distinct froma:CT_Picture), anchored by its enclosingDrawingAnchor. - Sheet
Protection - A sheet’s protection settings (
<sheetProtection>,CT_SheetProtection). Only the legacy 16-bit password hash (password="XXXX", still fully understood by every version of Excel even though the UI has written the newer SHA-512hashValue/saltValue/spinCountform since Excel 2013 — seewriter.rs::legacy_password_hash’s doc comment) is modeled. Every otherCT_SheetProtectionflag (formatCells/insertRows/sort/autoFilter/objects/..) is left at Excel’s own schema default — this crate only ever writessheet="1"and, if set,password, matching what checking Excel’s own “Protect Sheet” dialog with no extra options touched produces. - Sort
Condition - One sort key within a
SortState(<sortCondition>,CT_SortCondition). - Sort
State - A remembered sort order (
<sortState>,CT_SortState). Written in two different places depending on context: as a child of a worksheet-level<autoFilter>(Sheet::sort_state) or as a sibling of a table’s own<autoFilter>(ExcelTable::sort_state) — see each field’s own doc comment for the exact schema positioning, confirmed viasml.xsd’sCT_AutoFilter/CT_Tablesequences. Only the simplest, most common shape is modeled: a plain value-based ascending/descending sort per range (ST_SortBy’s"value", the schema default) —sortBy="cellColor"/ "fontColor"/"icon",customList, anddxfId/iconSet/iconId(color/ icon-based custom sort criteria) are not modeled, same “the common case, not every historical Excel option” posture asSheetProtection/AutoFilterColumn. Storage only — this crate does not itself reorder any rows, seeExcelTable.sort_state’s doc comment. - Table
Column - One column of an
ExcelTable(<tableColumn>,CT_TableColumn) — (plainnameonly), extended forcalculated_formula/totals_row_function/totals_row_label. - Table
Style - A custom table style definition (
<tableStyle>,CT_TableStyle), declared workbook-wide inxl/styles.xml’s<tableStyles>(CT_TableStyles) and referenced by name from anExcelTable’s owntable_style_name. Confirmed againstsml.xsd:CT_Stylesheet’s own sequence putstableStylesright afterdxfs, beforecolors(not written by this crate). This crate only ever writespivot="0"(this style is for tables, not pivot tables) and nocountattribute (CT_TableStyle’scountis informational, Excel recomputes it). - Table
Style Element - One formatted region of a
TableStyle(<tableStyleElement>,CT_TableStyleElement). - Workbook
- A
.xlsxworkbook: a sequence of sheets, in the order they appear in Excel’s own sheet tabs. - Workbook
Protection - Workbook structure protection (
<workbookProtection>,CT_WorkbookProtection). Locks whether sheets can be added/renamed/hidden/reordered/deleted (lockStructure) and/or whether the workbook’s window can be moved/resized/closed (lockWindows) — distinct fromSheetProtection, which locks cell editing within one sheet. Uses the same legacy 16-bit password hash asSheetProtection(seewriter.rs::legacy_password_hash’s doc comment for the algorithm and its caveats) — implemented but not yet verified against a real Excel installation. - Write
Protection - Write-protection / “read-only recommended” (
<fileSharing>,CT_FileSharing) — point 54, seeWorkbook::write_protection’s doc comment for how this differs fromWorkbookProtection. Confirmed againstsml.xsd:readOnlyRecommendeddefaults tofalse;userNameis a plain display string (shown in Excel’s own “reserved by..” prompt);reservationPassworduses the same legacy 16-bit hash asWorkbookProtection/SheetProtection(seewriter.rs::legacy_password_hash’s doc comment) — the newer SHA-512algorithmName/hashValue/saltValue/spinCountform is not modeled, same “one well-defined mechanism” posture asProtectedRange.
Enums§
- Border
Style - A border line style (
ST_BorderStyle) — only the handful of styles a real spreadsheet actually uses day to day are modeled;hair/mediumDashed/dashDot/mediumDashDot/dashDotDot/mediumDashDotDot/slantDashDotare not (out of scope, same scope-reduction posture as elsewhere in this crate). - Calculation
Mode - A workbook’s recalculation mode (
<calcPr calcMode="..">,ST_CalcMode). - Cell
Value - A cell’s value.
- Cfvo
Position - A threshold position for a
ColorScaleStop/DataBarmin or max (<cfvo type=".." val="..">,CT_Cfvo) — only the three most commonST_CfvoTypevalues are modeled;formula/percentile/autoMin/autoMaxare not. - Comparison
Operator - A relational comparison operator, shared between
ConditionalFormattingCondition::CellIsandDataValidationKind’sWholeNumber/Decimalvariants — ECMA-376 defines two separate simple types for these (ST_ConditionalFormattingOperator/ST_DataValidationOperator), but both share exactly the same 8 relational values, so one Rust enum covers both. Neither schema’s full enumeration is modeled:ST_ConditionalFormattingOperator’scontainsText/notContains/beginsWith/endsWithare, despite sharing the same XML attribute, really distinct rule types in Excel’s own “Highlight Cells Rules” UI, notcellIsvariants — out of scope. - Conditional
Formatting Condition - A conditional formatting rule’s condition — only
cellIs(a direct value comparison) andexpression(an arbitrary custom formula) are modeled,CT_CfRule’s two simplest and most common types. - Custom
Property Value - A single custom document property’s value (
docProps/custom.xml,CT_Property’s valuexsd:choice— this crate models the same 4 of its many variant types asword-ooxml’s ownCustomPropertyValue:vt:lpwstr(Text),vt:bool(Bool),vt:i4(Int),vt:r8(Number)).CT_Propertyalso allows a date variant (vt:filetime) and several others (vectors, blobs, currency..) not modeled here — same “simple case first, mirror the sibling crate’s own scope decision” posture asword-ooxml’s own doc comment for this exact type explains. - Data
Validation Kind - The validation performed by a
DataValidationRule. - Drawing
Object - The object anchored by a
DrawingAnchor— a picture or a chart. - Error
- Errors that can occur while reading or writing a
.xlsxworkbook. - Horizontal
Alignment - A cell’s horizontal alignment (
ST_HorizontalAlignment) — only the three most common values are modeled;general/fill/justify/centerContinuous/distributedare not (they read back asNone). - Hyperlink
Target - A
CellHyperlink’s target. - Icon
SetType - A
ConditionalFormattingCondition::IconSet’s visual style (ST_IconSetType) — only the handful of 3-icon sets most commonly used are modeled. - Page
Orientation - A sheet’s page orientation (
ST_Orientation) — onlyportrait/landscapeare modeled,default(a third schema value, treated by Excel as “portrait”) is not, same posture asword-ooxml’s ownPageOrientation. - Pattern
Type - A
CellFormat::pattern_fill’s pattern (ST_PatternType) — the solid fill is deliberately excluded here (that’sCellFormat::fill_color’s job, the common case); only the non-solid patterns are modeled. - Picture
Format - A picture’s raw image format — mirrors
word_ooxml::ImageFormatexactly (same four formats, same extension/content-type mapping), kept as its own type rather than shared across crates since neither host crate depends on the other. - Sheet
Visibility - A sheet’s tab visibility (
<sheet state=".">,ST_SheetState) — replacing the plainboolused since.VeryHidden(unlikeHidden) cannot be un-hidden from Excel’s own “Unhide.” dialog — only from the VBA object model or by editing the file directly — real-world usage is normally to hide implementation-detail sheets (lookup tables, staging data) from end users while still letting formulas reference them. - Table
Style Element Type - Which region of a table a
TableStyleElementformats (ST_TableStyleType) — only the most commonly used values are modeled (whole-table default, header/total rows, and row/column banding);ST_TableStyleType’s remaining values (firstHeaderCell/lastHeaderCell/firstTotalCell/lastTotalCell/firstSubtotalColumn/secondSubtotalColumn/thirdSubtotalColumn/firstSubtotalRow/secondSubtotalRow/thirdSubtotalRow/blankRow/firstColumnSubheading/secondColumnSubheading/thirdColumnSubheading/firstRowSubheading/secondRowSubheading/thirdRowSubheading/pageFieldLabels/pageFieldValues, confirmed viasml.xsd) cover niche PivotTable-report and outline-subtotal layouts out of this crate’s current scope. - Text
Comparison Operator - The comparison performed by a
ConditionalFormattingCondition::ContainsTextrule — shares thecellIs-adjacentoperatorattribute name withComparisonOperator, but is a distinct, disjoint set of values (ST_ConditionalFormattingOperator’s text-comparison subset), so it’s its own enum rather than reusingComparisonOperator. - Totals
RowFunction - A table column’s totals-row aggregate function (
ST_TotalsRowFunction).ST_TotalsRowFunction’s"none"value isn’t modeled as its own variant, same convention as elsewhere in this crate —Option::NoneonTableColumn::totals_row_functionalready expresses it. - Vertical
Alignment - A cell’s vertical alignment (
ST_VerticalAlignment) — only the three most common values are modeled;justify/distributedare not (they read back asNone).