RecursiveAI.OneDocument.Documents 1.0.0

dotnet add package RecursiveAI.OneDocument.Documents --version 1.0.0
                    
NuGet\Install-Package RecursiveAI.OneDocument.Documents -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="RecursiveAI.OneDocument.Documents" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="RecursiveAI.OneDocument.Documents" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="RecursiveAI.OneDocument.Documents" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add RecursiveAI.OneDocument.Documents --version 1.0.0
                    
#r "nuget: RecursiveAI.OneDocument.Documents, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package RecursiveAI.OneDocument.Documents@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=RecursiveAI.OneDocument.Documents&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=RecursiveAI.OneDocument.Documents&version=1.0.0
                    
Install as a Cake Tool

RecursiveAI.OneDocument.Documents

Read, write, calculate, template and render Word, Excel and PowerPoint documents (OOXML, legacy binary, RTF, ODF) in pure .NET. Not affiliated with Microsoft.

This package is the word-processing part of OneDocument (a preview, not yet published). It opens, edits and saves DOCX, DOCM, DOTX, DOTM and Flat OPC documents, and reads and writes RTF, ODT, HTML and Markdown through the same model:

  • Lossless. Parts you did not edit are written back byte-identical (stored entries are copied, not recompressed). Edited parts keep unknown elements, attributes, prefixes, mc:AlternateContent and extLst in their original order.
  • Lazy. Opening reads the package structure and the main part; every other part is read when you first use it. Nothing is recalculated or changed by opening.
  • Safe. The format is found from the content, never the extension. Damage is reported as typed defects with locations, resource limits are on by default, and Save() replaces the file atomically.
  • The model: paragraphs, runs, tables, sections, headers and footers, styles with inheritance, numbering, fields, footnotes and endnotes, comments, revisions and content controls, each also reachable as generated typed views over the markup.
using RecursiveAI.OneDocument.Documents;

using var doc = Document.Open("contract.docx");
doc.Paragraphs.First().SetText("Master services agreement");
doc.Save();                       // atomic replace; only word/document.xml changes
doc.SaveAs("contract.dotx");      // a copy, as a template
string text = doc.ExtractText();

The Office statics (Office.Open, Office.ExtractText) reach this package as soon as an application references it: no registration call is needed (the package adds a module initializer to your C# project at build time; set OneDocumentAutoRegister to false to opt out and call DocumentFormats.Register(registry) yourself). Word 97-2003 and Word 6/95 binary files (DOC) and the 2003 XML format are read and converted into the same model (Document.SourceFormat, Document.ImportLoss); writing DOC is not supported. A format this package does not handle raises FormatNotAvailableException naming the format.

See the repository for the support table and the changelog.

Licensed MIT OR Apache-2.0, © Recursive AI, LLC. Not affiliated with Microsoft or with any other product or company named OneDocument.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on RecursiveAI.OneDocument.Documents:

Package Downloads
RecursiveAI.OneDocument.Rendering

Read, write, calculate, template and render Word, Excel and PowerPoint documents (OOXML, legacy binary, RTF, ODF) in pure .NET. Not affiliated with Microsoft. Layout and rendering of documents, workbooks and presentations to tagged PDF and PNG for OneDocument, with its own Office layout engine, charts, SmartArt, equations and metafile drawing.

RecursiveAI.OneDocument.All

Read, write, calculate, template and render Word, Excel and PowerPoint documents (OOXML, legacy binary, RTF, ODF) in pure .NET. Not affiliated with Microsoft. Metapackage that brings in every OneDocument package that has content (core, documents, spreadsheets, presentations, schema views and rendering).

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 0 11/6/2026

See CHANGELOG.md in the repository.