Skip to content
Projets

À propos

Bibliothèques .NET sous licence MIT et sans COM pour créer, lire, modifier, convertir, effectuer le rendu et extraire des formats Office, PDF, e-mail, OneNote et texte.

Productivité et automatisation

Comment ces chiffres sont mesurés

Progression mesurée des étoiles

in 24h
+2
in 7 days
+8
in 15 days
+37
in 1 month
Historique en cours

Variations nettes sur des périodes qui se chevauchent, pas des totaux quotidiens. Les mesures absentes restent vides. Les étoiles indiquent l’intérêt, pas la qualité.

README.md

Original

OfficeIMO

CI NuGet PowerShell Gallery license Discord

OfficeIMO creates, edits, reads and converts Word, Excel, PowerPoint and PDF files, plus Visio, Project, Access, OpenDocument, Apple iWork, email, e-books, Markdown, HTML and dozens of other formats. It is open source, MIT licensed and doesn't need Microsoft Office or COM. The same engines run in .NET applications, PowerShell scripts, a command line, AI agents, a desktop app and the browser.

Ways to use it

You work in Use Start with
.NET Focused NuGet packages, one per format or conversion dotnet add package OfficeIMO
PowerShell 5.1 and 7 PSWriteOffice Install-Module PSWriteOffice
A terminal or CI job The officeimo command line (OfficeIMO.Tool) dotnet tool install --global OfficeIMO.Tool (.NET 10 SDK)
An AI agent The same tool as an MCP server, with the Document Tools plugin for Claude Code, Codex, VS Code and Cursor officeimo mcp serve --stdio
A desktop app OfficeIMO Studio for reading, marking up, filling, converting, protecting and signing documents on Windows and Linux (README); native Mac, iPad and iPhone apps are in development (README) Downloads
A browser Browser tools that convert and organize files in the tab, without uploading them officeimo.com

Why OfficeIMO

  • No Office, no COM, no native dependencies. The engines are managed code that runs on Windows, macOS and Linux, in services, containers and build agents. Optional providers, such as Tesseract for OCR, are opt-in. The package catalog lists every third-party dependency.
  • One library for old and new files. Word, Excel and PowerPoint cover the Open XML formats and the documented subsets of .doc, .xls, .xlsb and .ppt, with compatibility reports for what a subset doesn't carry.
  • Conversions say what they lost. OfficeConverter and the SaveAs and To conversion methods return a report of what the target couldn't carry. You can inspect it, or set FailOnLoss to stop instead of writing a lossy file. The route catalog lists each route's result type and limits.
  • Careful with untrusted input. Readers bound bytes, package entries, ZIP expansion and decoded text before allocating, and flag hidden or prompt-like content before it reaches an AI pipeline. See the content safety matrix.
  • NativeAOT and WebAssembly. CI publishes the core engines with NativeAOT on Linux and Windows, and the officeimo.com browser tools run them in WebAssembly.
  • Measured, not claimed. Performance figures come from repeatable workloads in Docs/performance and the published benchmarks, with the method next to each result.
  • Finished-looking output. New documents start from a theme, so tables, charts and slides look right without styling each element.

Install

dotnet add package OfficeIMO

OfficeIMO brings Word, Excel, PowerPoint, PDF and Markdown, the conversions between them, OfficeConverter and the document reader. To keep a dependency small, reference only the packages you use.

Quick start

A Word report, an Excel table with a chart and a PowerPoint deck from the same data, each also saved as PDF:

using OfficeIMO;
using OfficeIMO.Excel;
using OfficeIMO.Excel.Pdf;
using OfficeIMO.PowerPoint;
using OfficeIMO.PowerPoint.Pdf;
using OfficeIMO.Word;
using OfficeIMO.Word.Pdf;

Sale[] sales = [new("North", 182_400m, 0.12), new("South", 141_900m, 0.08), new("West", 97_300m, -0.03)];

using (var report = WordDocument.Create("Sales.docx")) {
    report.AddHeading("Quarterly sales", level: 1);
    report.AddParagraph("Revenue by region for the third quarter.");
    report.AddTable(sales);
    report.AddChart(OfficeChartType.Column, sales, nameof(Sale.Region), nameof(Sale.Revenue));
    report.Save();
    report.SaveAsPdf("Sales.pdf");
}

using (var book = ExcelDocument.Create("Sales.xlsx", new ExcelCreateOptions { Theme = OfficeTheme.Modern })) {
    ExcelSheet sheet = book.AddSheet("Sales");
    sheet.AddTable(sales, new OfficeTableOptions { Name = "Sales" });
    sheet.AddChart(OfficeChartType.Column, sales, nameof(Sale.Region),
        new ExcelChartOptions { Title = "Revenue by region", Row = 2, Column = 6 }, nameof(Sale.Revenue));
    book.Save();
    book.SaveAsPdf("Sales-workbook.pdf");
}

using (var deck = PowerPointDocument.Create("Sales.pptx")) {
    deck.AddSlide().AddTitle("Quarterly sales");
    PowerPointSlide chartSlide = deck.AddSlide();
    chartSlide.AddTitle("Revenue by region");
    chartSlide.AddChart(OfficeChartType.Column, sales, nameof(Sale.Region), new PowerPointChartOptions {
        Left = OfficeLength.Centimeters(2.3), Top = OfficeLength.Centimeters(5.5),
        Width = OfficeLength.Centimeters(29), Height = OfficeLength.Centimeters(12)
    }, nameof(Sale.Revenue));
    deck.Save();
    deck.SaveAsPdf("Sales-deck.pdf");
}

record Sale(string Region, decimal Revenue, double Growth);

Word, Excel and PowerPoint share one shape: {Format}Document.Create, Load and Save; AddParagraph, AddTable and AddChart return what they created; SaveAsPdf and the other SaveAs methods write another format and return the conversion report. The other engines keep the same Create, Load and Save lifecycle with content APIs that fit their format, such as OneNoteSection for OneNote. OfficeConverter.Convert converts files and whole folders, with resumable batches; the OfficeIMO package README shows how. Themes, colors and lengths are shared by every format and described in OfficeIMO.Core.

Formats

98 formats and 361 conversion routes. Every route runs from .NET; 93 run from the officeimo CLI, 93 in Studio, 102 from PSWriteOffice and 14 in the browser tools on officeimo.com.

Family Formats Routes from
Documents DOCX, DOC, ODT, RTF, Pages, Google Docs, DOCM, DOTM, DOTX, Word, Word XML 41
Spreadsheets XLSX, ODS, CSV, DBF/xBase, Numbers, Google Sheets, Excel, TSV, XLAM, XLS, XLSB, XLSM, XLTM, XLTX, XML Spreadsheet 2003 48
Presentations PPTX, ODP, Keynote, Google Slides, POT, POTM, POTX, PowerPoint, PPAM, PPS, PPSM, PPSX, PPT, PPTM 30
PDF and fixed layout PDF, XPS/OpenXPS, MHTML, DjVu 33
Diagrams Visio, ODG/FODG, Binary Visio, Binary Visio stencil, Binary Visio template, VSDX, VSSX, VSTX 18
Project and Publisher Project, Publisher 11
Images PNG, SVG, JPEG, TIFF, WebP, HEIC 1
Notes and books OneNote, EPUB, AZW3, Comic book ZIP, Comic book 7z, Comic book RAR 5, Comic book TAR, FictionBook 2, Mobipocket and Kindle, Book project, Compiled HTML Help 49
Notebooks Jupyter Notebook, Notebook source 6
Email Email, EML, MSG, OFT, TNEF 18
Bibliography BibTeX, BibLaTeX, CSL JSON, RIS, NBIB/MEDLINE, EndNote XML 30
Markup and text Markdown, AsciiDoc, LaTeX, Plain text, OfficeIMO Markup 20
Web and wiki HTML, Web article list, Confluence, ADF 21
Data JSON, JSON Lines, TOML, XML, YAML 35

Pick two formats on the interactive format map to see the route between them, or read the conversion route catalog for each route's package, API, support level and limits.

Read documents for search and AI

OfficeDocumentReader from OfficeIMO.Reader.All reads any supported format into text, tables, metadata and chunks with source locations, ready for indexing or an AI pipeline. OfficeIMO.Reader.DocumentExtraction offers the same reading as a provider for Microsoft.Extensions.DocumentExtraction (preview). Scanned pages go through an optional OCR provider (OfficeIMO.Ocr). The officeimo MCP server exposes the same reading, search and conversion to agents.

Before a document leaves your hands, the engines can find and remove author names, comments, tracked changes, hidden text and other hidden data, check accessibility, and sign Word, PDF and email with OfficeIMO.Security.

Packages

Each format has its own package. Most conversions live in an adapter named OfficeIMO.{Source}.{Target} that brings only the two engines it joins, and readers for search and AI are OfficeIMO.Reader.{Format}. A few routes live in the format package itself; the route catalog names the package for every route. The main engines:

Area Package Document type
Word .docx, .doc OfficeIMO.Word WordDocument
Excel .xlsx, .xlsb, .xls OfficeIMO.Excel ExcelDocument
PowerPoint .pptx, .ppt OfficeIMO.PowerPoint PowerPointDocument
PDF OfficeIMO.Pdf PdfDocument
Markdown OfficeIMO.Markdown MarkdownDocument
HTML OfficeIMO.Html HtmlDocument
Visio OfficeIMO.Visio VisioDocument
Project OfficeIMO.Project ProjectDocument
Access OfficeIMO.Access AccessDocument
OpenDocument OfficeIMO.OpenDocument
Apple Pages, Numbers, Keynote OfficeIMO.IWork
OneNote OfficeIMO.OneNote OneNoteSection
Email and mail stores OfficeIMO.Email
EPUB OfficeIMO.Epub EpubDocument
RTF OfficeIMO.Rtf RtfDocument
CSV, YAML, TOML OfficeIMO.CSV, OfficeIMO.Yaml, OfficeIMO.Toml
Archives (ZIP, 7z, CAB, MSI, TAR, gzip) OfficeIMO.Archives
File and folder conversion, printing OfficeIMO, OfficeIMO.Workflows OfficeConverter

The package catalog lists every package, from Publisher, XPS and DjVu to Google Workspace, Confluence and electronic invoices, with its dependencies. The operation contract shows what each package can create, read, edit and convert.

Platforms

Every library targets netstandard2.0, net8.0 and net10.0; Windows builds also target net472, so .NET Framework applications get the same routes. A few packages that need a modern runtime, such as OfficeIMO.Tool, OfficeIMO.AI and OfficeIMO.Odbc, target modern .NET only, and their READMEs say so. A handful of results come from the runtime and can differ between .NET Framework and modern .NET; platform differences lists them.

Word uses the Open XML SDK for package mechanics, and HTML uses AngleSharp for parsing. Excel, PowerPoint, PDF, Markdown, RTF, OpenDocument, OneNote, email and the other engines are OfficeIMO's own code, including their package and XML layers.

Keep every OfficeIMO package in an application on the same version.

Documentation

Report bugs and request features in OfficeIMO issues, for the libraries, the tools and PSWriteOffice alike. Questions and examples are welcome on Discord.

Snapshot testing

Verify.OfficeIMO, from the Verify project, turns Word, Excel, PowerPoint, PDF, email, Visio and other OfficeIMO documents into text and page images that Verify compares with approved snapshots.

Sponsors

If OfficeIMO saves you time, please consider supporting the work through GitHub Sponsors or PayPal.

KelvinTegelaar Andrew Birch Complea Thomas Møller Jake Hildreth syazdian CodeRabbit

See all sponsors

License

MIT. See LICENSE.

Explorer des projets similaires

Chargement…