---
title: "onedocument docs"
url: https://recursiveai.org/onedocument/docs/
description: "Everything about OneDocument: getting started, the notes for documents, workbooks and presentations, templates and operations, sanitizing and redaction…"
version: "1.0.0"
---

# onedocument docs

Everything about OneDocument: getting started, the notes for documents, workbooks and presentations, templates and operations, sanitizing and redaction, rendering, coming from another library, and the project’s own 1.0 results.

## Start

- [Getting started](https://recursiveai.org/onedocument/docs/getting-started/index.md): Install OneDocument 1.0.0 for .NET 10, read a Word document, convert it to PDF, read and recalculate an Excel workbook, and use the onedocument…
- [Overview](https://recursiveai.org/onedocument/docs/overview/index.md): OneDocument is a clean-room document processor for net10.0 that depends only on the .NET base class library and other Recursive AI libraries. It is…
- [All notes](https://recursiveai.org/onedocument/docs/docs-map/index.md): Normative notes on how OneDocument behaves, one page per area. The code's XML documentation states the details of each type; these pages state the rules…
- [Contracts and the format registry](https://recursiveai.org/onedocument/docs/contracts/index.md): The contracts every layer of OneDocument is written against. They live in the core package (RecursiveAI.OneDocument). This note states the behaviour; the…
- [NativeAOT, WebAssembly and mobile](https://recursiveai.org/onedocument/docs/platforms/index.md): OneDocument targets net10.0 and runs the same code on the desktop runtime, under NativeAOT, in browser WebAssembly, in an iOS simulator and in an Android…

## Coming from another library

- [Which page to read](https://recursiveai.org/onedocument/docs/migration/index.md): These pages map the common tasks of seven libraries to OneDocument, call by call. They are written from each library's published API documentation.…
- [From the Open XML SDK](https://recursiveai.org/onedocument/docs/migration-open-xml-sdk/index.md): The Open XML SDK gives you the packages, parts and a typed class per schema element: WordprocessingDocument, SpreadsheetDocument, PresentationDocument…
- [From ClosedXML](https://recursiveai.org/onedocument/docs/migration-closedxml/index.md): ClosedXML edits workbooks through XLWorkbook, IXLWorksheet, IXLCell and IXLRange; ClosedXML.Report fills templates. OneDocument's equivalents are…
- [From EPPlus](https://recursiveai.org/onedocument/docs/migration-epplus/index.md): EPPlus 4.x edits workbooks through ExcelPackage, ExcelWorkbook, ExcelWorksheet and ExcelRange. OneDocument's workbook is Workbook / Worksheet / Cell.…
- [From NPOI](https://recursiveai.org/onedocument/docs/migration-npoi/index.md): NPOI has three families that matter here: XSSF* (OOXML workbooks), HSSF* (legacy .xls) and XWPF* (Word documents). OneDocument has one model per kind…
- [From MiniExcel](https://recursiveai.org/onedocument/docs/migration-miniexcel/index.md): MiniExcel moves rows of data and dictionaries in and out of XLSX and CSV with static methods and fills workbook templates. OneDocument has the same…
- [From ShapeCrawler](https://recursiveai.org/onedocument/docs/migration-shapecrawler/index.md): ShapeCrawler edits PowerPoint files through a presentation object with slides and shapes. OneDocument's Presentation is the same idea on a lossless model…
- [From Xceed DocX](https://recursiveai.org/onedocument/docs/migration-xceed-docx/index.md): DocX loads a Word document with DocX.Load, exposes Paragraphs, Tables, InsertParagraph, ReplaceText and AddTable, and saves. OneDocument's Document covers…

## Word-processing documents

- [Authoring content](https://recursiveai.org/onedocument/docs/authoring/index.md): The hub types add content through small calls that write through the markup tree and the generated views. Everything else in the part stays as it was…
- [Styles and numbering](https://recursiveai.org/onedocument/docs/docx-styles-numbering/index.md): How the document hub resolves formatting and list labels. References are to ECMA-376 Part 1 (5th edition) unless noted. Where Word's behaviour is not…
- [Tables, sections, headers and footers](https://recursiveai.org/onedocument/docs/docx-tables-sections/index.md): How the document hub reads and edits them. References are to ECMA-376 Part 1 (5th edition) unless noted. Items marked to check against Word are what the…
- [Fields, notes and comments](https://recursiveai.org/onedocument/docs/docx-fields-notes-comments/index.md): How the document hub reads and edits fields, footnotes and endnotes, and comments. The model holds codes and cached results; evaluating a field that needs…
- [Content controls](https://recursiveai.org/onedocument/docs/docx-content-controls/index.md): Document.ContentControls() enumerates every w:sdt of the main part and of its headers, footers, footnotes and endnotes in document order (a control before…
- [Text boxes, stories and properties](https://recursiveai.org/onedocument/docs/docx-stories-properties/index.md): Document.TextBoxes() lists the text boxes of every story (body, headers and footers, footnotes, endnotes, comments); BlockContainer.TextBoxes() and…
- [Tracked changes](https://recursiveai.org/onedocument/docs/revisions/index.md): This note states what the revision model (RecursiveAI.OneDocument.Documents.Revisions) does. The XML documentation on each type states the details.…
- [Word binary (.doc)](https://recursiveai.org/onedocument/docs/doc/index.md): RecursiveAI.OneDocument.Doc.Binary (package .Documents) reads Word 97, 2000, 2002, 2003, 2007, 2010 and 2013 binary documents, Word 6.0 and Word 95…
- [RTF](https://recursiveai.org/onedocument/docs/rtf/index.md): RTF is read into and written from the word-processing hub (Document). The format has no part structure to keep byte-for-byte, so the lossless layer is a…
- [Word and Excel 2003 XML](https://recursiveai.org/onedocument/docs/xml-2003/index.md): Both formats are read-only. A file opens as a Document or a Workbook by conversion: the reader turns the 2003 file into an in-memory OOXML package (DOCX…
- [HTML](https://recursiveai.org/onedocument/docs/html/index.md): HTML reads into the word-processing hub and the hub writes it back. Both directions report what they could not carry.
- [Markdown](https://recursiveai.org/onedocument/docs/markdown/index.md): CommonMark 0.31.2 with the GitHub Flavored Markdown extensions, into and out of the document hub, and out of workbooks and presentations.
- [OpenDocument text (ODT)](https://recursiveai.org/onedocument/docs/odf/index.md): OpenDocument files have a native layer in the core package (RecursiveAI.OneDocument.Odf) that the text, spreadsheet and presentation units share, and a…

## Workbooks

- [The workbook model](https://recursiveai.org/onedocument/docs/spreadsheets/index.md): RecursiveAI.OneDocument.Spreadsheets holds the SpreadsheetML hub: Workbook, Worksheet, Cell, the cell store and the shared string table. This note states…
- [Styles, tables and names](https://recursiveai.org/onedocument/docs/spreadsheets-styles/index.md): RecursiveAI.OneDocument.Spreadsheets models the rest of the workbook around the cells (ECMA-376 Part 1 §18). Every model is a view over the part's markup…
- [Streaming rows](https://recursiveai.org/onedocument/docs/spreadsheets-streaming/index.md): RecursiveAI.OneDocument.Spreadsheets.Streaming reads and writes XLSX, XLSM and Flat OPC workbooks as a forward-only stream of rows and cells, beside the…
- [Rows of plain objects](https://recursiveai.org/onedocument/docs/spreadsheets-poco/index.md): Spreadsheet.Read and Spreadsheet.Write move rows of plain classes, structs and records to and from XLSX, CSV and TSV in one call. They sit on the…
- [Recalculation](https://recursiveai.org/onedocument/docs/spreadsheets-calc/index.md): Namespace RecursiveAI.OneDocument.Spreadsheets.Calc, in the .Spreadsheets package, over the evaluator in calc.md. Entry points: Workbook.Recalculate…
- [Pivot tables](https://recursiveai.org/onedocument/docs/spreadsheets-pivots/index.md): Namespace RecursiveAI.OneDocument.Spreadsheets.Pivots, in the .Spreadsheets package. Entry points: Workbook.PivotCaches, Worksheet.PivotTables…
- [Formulas and the evaluator](https://recursiveai.org/onedocument/docs/calc/index.md): Namespace RecursiveAI.OneDocument.Calc in the core package. This page is the contract the function families, the workbook binding, recalculation and the…
- [Functions](https://recursiveai.org/onedocument/docs/calc-functions/index.md): The functions registered by FunctionRegistry.CreateDefault() for these four families, written from Microsoft's per-function reference pages. Columns…
- [Number formats](https://recursiveai.org/onedocument/docs/number-formats/index.md): Normative notes for RecursiveAI.OneDocument.NumberFormats: Excel's number-format code language as one shared service, and the date-serial rules it and the…
- [CSV and TSV](https://recursiveai.org/onedocument/docs/csv/index.md): Delimited text is a native layer of RecursiveAI.OneDocument.Spreadsheets (namespace RecursiveAI.OneDocument.Spreadsheets.Csv): a streaming reader, a value…
- [Binary workbooks (.xlsb)](https://recursiveai.org/onedocument/docs/xlsb/index.md): RecursiveAI.OneDocument.Xlsb (in the spreadsheets package) reads and writes the Excel binary workbook ([MS-XLSB]). The format is an OPC package whose…
- [Legacy workbooks (.xls)](https://recursiveai.org/onedocument/docs/xls/index.md): RecursiveAI.OneDocument.Spreadsheets.Biff reads Excel 2.0 to 2003 workbooks and converts them to the SpreadsheetML hub (Workbook). Reading follows…
- [OpenDocument spreadsheets (ODS)](https://recursiveai.org/onedocument/docs/ods/index.md): ODS, OTS and flat FODS (OpenDocument 1.2 and 1.3) read into the workbook hub and write back out, with a loss report each way. The package layer…

## Presentations

- [The presentation model](https://recursiveai.org/onedocument/docs/presentations/index.md): RecursiveAI.OneDocument.Presentations holds Presentation, Slide, SlideLayout, SlideMaster, NotesSlide, NotesMaster, Shape, TextBody/Paragraph/Run and…
- [PowerPoint binary (.ppt)](https://recursiveai.org/onedocument/docs/ppt/index.md): Presentation.Open, Office.Open, Office.ExtractText and Office.Convert read PowerPoint binary presentations. The file is read at record level…
- [OpenDocument presentations (ODP)](https://recursiveai.org/onedocument/docs/odp/index.md): Presentation.Open accepts ODP, OTP and flat FODP by content (the mimetype entry or office:mimetype), never the extension. The file is converted to an…

## Templates and operations

- [Templates](https://recursiveai.org/onedocument/docs/templating/index.md): Namespace RecursiveAI.OneDocument.Templating in the core package. This page states the template syntax, the extensions to Excel formula syntax, how the…
- [Word templates](https://recursiveai.org/onedocument/docs/templating-docx/index.md): Namespace RecursiveAI.OneDocument.Documents.Templating in the documents package. The engine, syntax, data model and defect codes are in templating.md…
- [Workbook templates](https://recursiveai.org/onedocument/docs/templating-xlsx/index.md): XlsxTemplateBinder.Render(workbook, data, options, xlsxOptions) (namespace RecursiveAI.OneDocument.Spreadsheets.Templating) renders a workbook template…
- [Presentation templates](https://recursiveai.org/onedocument/docs/templating-pptx/index.md): Namespace RecursiveAI.OneDocument.Presentations.Templating in the presentations package. PresentationTemplate.Render(presentation, data, options) fills a…
- [Mail merge](https://recursiveai.org/onedocument/docs/mail-merge/index.md): Document.MailMerge(data, options) runs Word's mail merge on a main document: the merge fields are replaced by their results for each record, the mailMerge…
- [Merge, append and split](https://recursiveai.org/onedocument/docs/operations-merge/index.md): Operations that combine documents, cut them apart, and store layout-time field results in the file. They edit the hub (the markup of the parts they…
- [Find and replace](https://recursiveai.org/onedocument/docs/operations-find-replace/index.md): Search and replace over the text of a document, a workbook or a presentation, as the reader sees it. The same matcher serves the three kinds…
- [Protection](https://recursiveai.org/onedocument/docs/protection/index.md): Editing restrictions and the passwords that lift them, for the three kinds. Read, set, verify and remove.

## Hidden content and security

- [Inspect and sanitize](https://recursiveai.org/onedocument/docs/sanitize/index.md): Office.Inspect(path) reports what a file holds that a reader does not see; Office.Sanitize(input, output) removes it into a new file and proves the result…
- [Sanitizer review (the project’s own)](https://recursiveai.org/onedocument/docs/sanitize-review/index.md): The project's own review (not an external audit) of Inspector and Sanitizer (docs/sanitize.md): for every category inspection reports, does it find every…
- [Redaction](https://recursiveai.org/onedocument/docs/redaction/index.md): True redaction removes content from the file, not from the view. OfficeFile.Redact(plan, path) (and Office.Redact(source, destination, plan)) takes a…
- [Redaction review (the project’s own)](https://recursiveai.org/onedocument/docs/redaction-review/index.md): The project's own review (not an external audit) of Office.Redact / OfficeFile.Redact. The question: after a match or region is redacted, can the removed…
- [VBA projects](https://recursiveai.org/onedocument/docs/vba/index.md): VBA is data here: it is read, listed, extracted and removed. It is never compiled, interpreted or run, the p-code is never decoded, and no password is…
- [Encrypted files](https://recursiveai.org/onedocument/docs/encryption/index.md): Password-protected files open when the caller supplies OpenContext.Password (Document.Open, Workbook.Open, Presentation.Open, Office.Open). Without a…
- [OLE objects](https://recursiveai.org/onedocument/docs/ole/index.md): How the legacy formats' document properties and embedded objects are read, written and carried into the hub. Namespace RecursiveAI.OneDocument.Ole (core).…
- [Accessibility checking](https://recursiveai.org/onedocument/docs/accessibility/index.md): Document.CheckAccessibility(), Workbook.CheckAccessibility(), Presentation.CheckAccessibility() and the one-liner Office.CheckAccessibility(path) check a…

## Rendering

- [Layout and PDF](https://recursiveai.org/onedocument/docs/layout/index.md): Workbooks print through their own pagination and cell layout: see spreadsheet-rendering.md. They share the paint contract, fonts and PDF/PNG output below…
- [Tables in layout](https://recursiveai.org/onedocument/docs/layout-tables/index.md): How LayoutEngine lays out and paints Word tables. It builds on the layout tree and paint contract in layout.md and on the logical table model in…
- [Floating objects](https://recursiveai.org/onedocument/docs/layout-floats/index.md): How anchored objects are positioned and how text goes round them. Code: Layout/Floats/, with hooks in the paragraph formatter, the page flow and the…
- [Page fields and tables of contents](https://recursiveai.org/onedocument/docs/layout-fields/index.md): Fields that depend on pages, and the table of contents, index and table of authorities, are resolved while a document is laid out (LayoutEngine.Layout, so…
- [Printing workbooks](https://recursiveai.org/onedocument/docs/spreadsheet-rendering/index.md): How OneDocument prints a workbook the way Excel does: which cells land on which page, how a cell's text is formed and placed, and what is painted. Package…
- [Slides to PDF and images](https://recursiveai.org/onedocument/docs/presentation-rendering/index.md): How a presentation becomes PDF and PNG pages. Namespace RecursiveAI.OneDocument.Rendering.Presentations, in the RecursiveAI.OneDocument.Rendering package.…
- [Page images and SVG](https://recursiveai.org/onedocument/docs/rendering-export/index.md): PageExporter writes the pages of a document, workbook or presentation as PNG, JPEG, TIFF, WebP or SVG. Pages are laid out once (the layout of each kind is…
- [Shapes and pictures](https://recursiveai.org/onedocument/docs/drawingml-rendering/index.md): How shapes, pictures and groups are painted. One painter serves Word drawings, slide shapes and worksheet drawings…
- [Charts](https://recursiveai.org/onedocument/docs/charts/index.md): How OneDocument reads, lays out and paints charts. Namespace RecursiveAI.OneDocument.Charts in RecursiveAI.OneDocument.Rendering…
- [SmartArt](https://recursiveai.org/onedocument/docs/smartart/index.md): How OneDocument paints SmartArt diagrams in Word, PowerPoint and Excel drawings. Namespace RecursiveAI.OneDocument.Rendering.SmartArt…
- [Equations](https://recursiveai.org/onedocument/docs/math-layout/index.md): Office Math (OMML, ECMA-376 Part 1 §22.1) is read into a typed tree, laid out with a TeX-style box layout driven by the math font's OpenType MATH table…
- [EMF and WMF pictures](https://recursiveai.org/onedocument/docs/metafiles/index.md): How OneDocument draws embedded Windows metafiles. Namespace RecursiveAI.OneDocument.Rendering.Metafiles, package RecursiveAI.OneDocument.Rendering. The…

## File internals

- [Packages and compound files](https://recursiveai.org/onedocument/docs/packaging/index.md): How RecursiveAI.OneDocument.Packaging reads and writes the containers under every format. Defect codes are in defects.md; limits in contracts.md.
- [The markup tree](https://recursiveai.org/onedocument/docs/markup/index.md): This note states the behaviour of the XML layer (RecursiveAI.OneDocument.Markup.Xml and RecursiveAI.OneDocument.Markup). The XML documentation on each…
- [OfficeArt](https://recursiveai.org/onedocument/docs/officeart/index.md): RecursiveAI.OneDocument.OfficeArt reads the drawing layer ([MS-ODRAW]) that the binary Word, Excel and PowerPoint formats share. It is a record-level…
- [Text extraction](https://recursiveai.org/onedocument/docs/text-extraction/index.md): OoxmlTextExtractor (namespace RecursiveAI.OneDocument.TextExtraction) extracts the text of word-processing, spreadsheet and presentation packages by…
- [Defect codes](https://recursiveai.org/onedocument/docs/defects/index.md): A defect's Code is a stable, lower-case, dot-separated identifier: .. The first segment names the layer that found it. A code is never reused for another…

## Results

- [The 1.0 gates](https://recursiveai.org/onedocument/docs/gates-1-0/index.md): What was run over the public corpus before 1.0, with the numbers and an explanation for every difference. The runs are one pass each, driven by…
- [Checks against Office](https://recursiveai.org/onedocument/docs/office-oracle-1-0/index.md): What desktop Word, Excel and PowerPoint did with OneDocument's output, and what OneDocument got wrong or right against them. The oracle drives the…
- [Fuzzing](https://recursiveai.org/onedocument/docs/fuzzing/index.md): The 1.0 fuzz campaign: every target in fuzz/run.sh for 600 s under libFuzzer with SharpFuzz instrumentation (the library assemblies and OneArchive), one…
- [Changelog](https://recursiveai.org/onedocument/docs/changelog/index.md): All notable changes are listed here. The format follows Keep a Changelog and the project follows Semantic Versioning.
