OfficeOxide 0.1.0
See the version list below for details.
dotnet add package OfficeOxide --version 0.1.0
NuGet\Install-Package OfficeOxide -Version 0.1.0
<PackageReference Include="OfficeOxide" Version="0.1.0" />
<PackageVersion Include="OfficeOxide" Version="0.1.0" />
<PackageReference Include="OfficeOxide" />
paket add OfficeOxide --version 0.1.0
#r "nuget: OfficeOxide, 0.1.0"
#:package OfficeOxide@0.1.0
#addin nuget:?package=OfficeOxide&version=0.1.0
#tool nuget:?package=OfficeOxide&version=0.1.0
OfficeOxide for .NET — The Fastest Office Document Library for C#
Idiomatic C# bindings for office_oxide — a fast Rust library for parsing, converting, and editing Microsoft Office documents (DOCX, XLSX, PPTX, DOC, XLS, PPT).
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 — 0.8ms mean DOCX, 5.0ms mean XLSX, 0.7ms mean PPTX; up to 100× faster than python-docx / openpyxl / python-pptx
- Reliable — 100% pass rate on valid Office files (6,062-file corpus); zero failures on legitimate documents
- 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 6,062 files from 11 independent public test suites. Single-thread, release build, warm disk cache.
| Library | Format | Mean | Pass Rate | License |
|---|---|---|---|---|
| office_oxide | DOCX | 0.8ms | 98.9% | MIT |
| python-docx | DOCX | 11.8ms | 95.1% | MIT |
| office_oxide | XLSX | 5.0ms | 97.8% | MIT |
| openpyxl | XLSX | 94.5ms | 96.2% | MIT |
| office_oxide | PPTX | 0.7ms | 98.4% | MIT |
| python-pptx | PPTX | 32.5ms | 86.7% | 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
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
License
Dual-licensed under MIT or Apache-2.0 at your option.
C# / .NET + Rust core | MIT / Apache-2.0 | 100% pass rate on valid Office files (6,062-file corpus) | Up to 100× faster than alternatives | 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.