Expand description
The handful of types needed to get started with any format, re-exported unprefixed. See the crate-level doc comment for why only these (and not the rest of the API) live here.
Alongside each format’s entry point, its single most basic content-building type is included
too (Paragraph for Word, Row for Excel, Slide for PowerPoint) — without at least one
of these, prelude::* alone can’t build so much as a “Hello, world!” file, which defeats
the point of a prelude. Cell (Excel) is included too: Sheet::write_cell accepts a raw
&str/f64/bool directly for the common cases, but reading a workbook back, or writing a
formula/date/rich-text cell, still means naming Cell/CellValue explicitly. None of these
collide with anything else re-exported here or in another format’s own module.
Structs§
- Cell
- A single cell (
<c>,CT_Cell): a value plus an optional style. - Document
- A
.docxdocument: a sequence of block-level content (paragraphs and tables), in reading order, plus an optional default header/footer and a set of named styles (word/styles.xml) paragraphs/runs can refer to. - Paragraph
- A paragraph: a sequence of runs, plus paragraph-level formatting.
- Presentation
- A
.pptxpresentation: an ordered list of slides, plus the slide size. - Row
- A single row of cells (
<row>,CT_Row). - Shape
Properties - A shape’s visual properties (
<a:spPr>,CT_ShapeProperties): local position/size, geometry, fill, and line. Everything about how a shape looks, independent of where it is anchored in its host document (that part is never modeled here — see the crate-level doc comment). - Slide
- A single slide: an ordered list of shapes (
<p:spTree>’s children), plus optional speaker notes. - Transform2D
- Position, size, rotation, and flipping (
<a:xfrm>,CT_Transform2D). Bothoffset/extentare optional in the schema (a shape can rely entirely on its host anchor for placement, e.g. a picture inside axdr:twoCellAnchorwith no localxfrmat all) —Nonehere means the element itself is either absent or written with only the attributes present, matching that flexibility rather than forcing a fixed size. - Workbook
- A
.xlsxworkbook: a sequence of sheets, in the order they appear in Excel’s own sheet tabs.