Repository avatar
AI Tools
v3.5.1
active

officeimo

io.github.EvotecIT/officeimo

Inspect, search, fetch, and convert local documents and mail stores with bounded access.

Documentation

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 inUseStart with
.NETFocused NuGet packages, one per format or conversiondotnet add package OfficeIMO
PowerShell 5.1 and 7PSWriteOfficeInstall-Module PSWriteOffice
A terminal or CI jobThe officeimo command line (OfficeIMO.Tool)dotnet tool install --global OfficeIMO.Tool (.NET 10 SDK)
An AI agentThe same tool as an MCP server, with the Document Tools plugin for Claude Code, Codex, VS Code and Cursorofficeimo mcp serve --stdio
A desktop appOfficeIMO 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 browserBrowser tools that convert and organize files in the tab, without uploading themofficeimo.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

96 formats and 349 conversion routes. Every route runs from .NET; 79 run from the officeimo CLI, 79 in Studio, 92 from PSWriteOffice and 14 in the browser tools on officeimo.com.

FamilyFormatsRoutes from
DocumentsDOCX, DOC, ODT, RTF, Pages, Google Docs, DOCM, DOTM, DOTX, Word, Word XML38
SpreadsheetsXLSX, ODS, CSV, DBF/xBase, Numbers, Google Sheets, Excel, TSV, XLAM, XLS, XLSB, XLSM, XLTM, XLTX, XML Spreadsheet 200348
PresentationsPPTX, ODP, Keynote, Google Slides, POT, POTM, POTX, PowerPoint, PPAM, PPS, PPSM, PPSX, PPT, PPTM30
PDF and fixed layoutPDF, XPS/OpenXPS, MHTML, DjVu32
DiagramsVisio, ODG/FODG, Binary Visio, Binary Visio stencil, Binary Visio template, VSDX, VSSX, VSTX18
Project and PublisherProject, Publisher11
ImagesPNG, SVG, JPEG, TIFF, WebP, HEIC1
Notes and booksOneNote, EPUB, Comic book ZIP, Comic book 7z, Comic book RAR 5 (stored), Comic book TAR, FictionBook 2, Mobipocket and Kindle, Book project, Compiled HTML Help45
NotebooksJupyter Notebook, Notebook source6
EmailEmail, EML, MSG, OFT, TNEF18
BibliographyBibTeX, BibLaTeX, CSL JSON, RIS, NBIB/MEDLINE, EndNote XML30
Markup and textMarkdown, AsciiDoc, LaTeX, Plain text, OfficeIMO Markup18
Web and wikiHTML, Confluence, ADF19
DataJSON, JSON Lines, TOML, XML, YAML35

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:

AreaPackageDocument type
Word .docx, .docOfficeIMO.WordWordDocument
Excel .xlsx, .xlsb, .xlsOfficeIMO.ExcelExcelDocument
PowerPoint .pptx, .pptOfficeIMO.PowerPointPowerPointDocument
PDFOfficeIMO.PdfPdfDocument
MarkdownOfficeIMO.MarkdownMarkdownDocument
HTMLOfficeIMO.HtmlHtmlDocument
VisioOfficeIMO.VisioVisioDocument
ProjectOfficeIMO.ProjectProjectDocument
AccessOfficeIMO.AccessAccessDocument
OpenDocumentOfficeIMO.OpenDocument
Apple Pages, Numbers, KeynoteOfficeIMO.IWork
OneNoteOfficeIMO.OneNoteOneNoteSection
Email and mail storesOfficeIMO.Email
EPUBOfficeIMO.EpubEpubDocument
RTFOfficeIMO.RtfRtfDocument
CSV, YAML, TOMLOfficeIMO.CSV, OfficeIMO.Yaml, OfficeIMO.Toml
Archives (ZIP, 7z, CAB, MSI, TAR, gzip)OfficeIMO.Archives
File and folder conversion, printingOfficeIMO, OfficeIMO.WorkflowsOfficeConverter

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, Excel and PowerPoint use the Open XML SDK for package mechanics, and HTML uses AngleSharp for parsing. The PDF, Markdown, RTF, OpenDocument, OneNote, email and other engines are OfficeIMO's own code.

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.

NUGET
OfficeIMO.Tool
Install Command
# nuget: OfficeIMO.Tool
Runtime: dnx