OfficeOxide 0.1.16
dotnet add package OfficeOxide --version 0.1.16
NuGet\Install-Package OfficeOxide -Version 0.1.16
<PackageReference Include="OfficeOxide" Version="0.1.16" />
<PackageVersion Include="OfficeOxide" Version="0.1.16" />
<PackageReference Include="OfficeOxide" />
paket add OfficeOxide --version 0.1.16
#r "nuget: OfficeOxide, 0.1.16"
#:package OfficeOxide@0.1.16
#addin nuget:?package=OfficeOxide&version=0.1.16
#tool nuget:?package=OfficeOxide&version=0.1.16
OfficeOxide for .NET — The Fastest Office Document Library for C#
Idiomatic C# bindings for office_oxide — a fast Rust library for parsing and converting Microsoft Office documents (DOCX, XLSX, PPTX, DOC, XLS, PPT), and for writing and editing DOCX, XLSX, and PPTX (the legacy binary formats are read-only, and convertible to OOXML via SaveAs).
IDisposable/usingpattern for native handles.LibraryImportsource generator — NativeAOT-compatible, trim-safe.net8.0andnet10.0target frameworks.- Async helpers (
Document.OpenAsync) that offload to the thread pool.
Part of the office_oxide toolkit. Same Rust core, same pass rate as the Rust, Python, Go, JavaScript (native), and WASM bindings.
Quick Start
dotnet add package OfficeOxide
using OfficeOxide;
using var doc = Document.Open("report.docx");
Console.WriteLine(doc.Format); // "docx"
Console.WriteLine(doc.PlainText());
Console.WriteLine(doc.ToMarkdown());
Why OfficeOxide?
- Fast — 1.7ms mean DOCX, 6.2ms mean XLSX, 2.6ms mean PPTX; 5–10× faster than python-docx / openpyxl / python-pptx
- Reliable — opens 97.3% of a 10,386-file test collection; the rest are encrypted, truncated or corrupt files
- Complete — 6 formats: DOCX, XLSX, PPTX + legacy DOC, XLS, PPT
- Permissive — MIT / Apache-2.0, no AGPL or GPL restrictions
- NativeAOT-safe —
LibraryImportsource generator, trim-compatible
Performance
Benchmarked on 10,386 files (the project's test collection). Single-thread, release build, warm disk cache.
| Library | Format | Mean | Pass Rate | License |
|---|---|---|---|---|
| office_oxide | DOCX | 1.7ms | 98.7% | MIT |
| python-docx | DOCX | 9.5ms | 95.7% | MIT |
| office_oxide | XLSX | 6.2ms | 98.6% | MIT |
| openpyxl | XLSX | 60.7ms | 96.0% | MIT |
| office_oxide | PPTX | 2.6ms | 98.1% | MIT |
| python-pptx | PPTX | 13.4ms | 90.0% | MIT |
Installation
dotnet add package OfficeOxide
The NuGet package bundles pre-built native libraries for:
| Platform | x64 | ARM64 |
|---|---|---|
| Linux (glibc) | Yes | Yes |
| macOS | Yes | Yes (Apple Silicon) |
| Windows | Yes | Yes |
Editing
Only DOCX, XLSX, and PPTX are editable; DOC, XLS, and PPT are read-only.
using var ed = EditableDocument.Open("template.docx");
ed.ReplaceText("{{NAME}}", "Alice");
ed.Save("out.docx");
Spreadsheet cells
using var ed = EditableDocument.Open("report.xlsx");
ed.SetCell(0, "A1", "Revenue");
ed.SetCell(0, "B1", 12345.67);
ed.SetCell(0, "C1", true);
ed.Save("report.edited.xlsx");
One-shot helpers
string text = OfficeOxide.ExtractText("report.docx");
string md = OfficeOxide.ToMarkdown("report.docx");
string html = OfficeOxide.ToHtml("report.docx");
Other languages
office_oxide ships the same Rust core through six bindings:
- Rust —
cargo add office_oxide— see docs.rs/office_oxide - Python —
pip install office-oxide— see python/README.md - Go —
go get github.com/yfedoseev/office_oxide/go— see go/README.md - JavaScript (native) —
npm install office-oxide— see js/README.md - WASM —
npm install office-oxide-wasm— see wasm-pkg/README.md
Why I built this
I needed a library that could read all six Office formats at once — not six separate packages — and I needed it without pulling in a JVM, a Python runtime, or a GPL-licensed dependency. The same Rust binary powers Python via PyO3, Node.js via koffi, Go via cgo, C# via P/Invoke, and the browser via WASM — one fix lands everywhere.
If something's broken or missing, open an issue.
— Yury
Per-document options and limits
using var options = new ParseOptions(strict: true).Set("text_chars", 5_000_000UL);
try
{
using var doc = Document.Open("upload.docx", options);
}
catch (OfficeOxideException e) when (e.IsIncomplete)
{
// refused: part of the document is missing
}
using var d = Document.FromBytes(data, "xlsx");
foreach (var damage in d.Damage()) Console.WriteLine($"{damage.Kind} {damage.Part} {damage.Detail}");
The options belong to the document: nothing global changes. ParseOptions.Names()
lists every option.
License
Dual-licensed under MIT or Apache-2.0 at your option.
C# / .NET + Rust core | MIT / Apache-2.0 | Opens 97.3% of a 10,386-file test collection | 5–10× faster than the common Python libraries | 6 formats
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. 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. |
-
net10.0
- No dependencies.
-
net8.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.16 | 109 | 10/30/2026 |
| 0.1.15 | 142 | 10/15/2026 |
| 0.1.14 | 114 | 10/13/2026 |
| 0.1.13 | 131 | 9/30/2026 |
| 0.1.12 | 135 | 9/21/2026 |
| 0.1.11 | 151 | 9/11/2026 |
| 0.1.10 | 159 | 9/8/2026 |
| 0.1.9 | 186 | 9/1/2026 |
| 0.1.8 | 242 | 7/22/2026 |
| 0.1.7 | 142 | 7/19/2026 |
| 0.1.6 | 156 | 7/13/2026 |
| 0.1.5 | 169 | 7/13/2026 |
| 0.1.4 | 166 | 7/13/2026 |
| 0.1.3 | 163 | 7/4/2026 |
| 0.1.2 | 193 | 5/15/2026 |
| 0.1.1 | 155 | 5/1/2026 |
| 0.1.0 | 160 | 4/28/2026 |