# OfficeIMO – Microsoft Word .NET Library

OfficeIMO — Open XML utilities for .NET (Word, Excel, PowerPoint, Visio) If you would like to contact me you can do so via Twitter or LinkedIn. OfficeIMO is a family of lightweight, cross‑platform .NET libraries that make working with Offic...

pages

OfficeIMO — Open XML utilities for .NET (Word, Excel, PowerPoint, Visio) If you would like to contact me you can do so via Twitter or LinkedIn. OfficeIMO is a family of lightweight, cross‑platform .NET libraries that make working with Offic...

If you would like to contact me you can do so via Twitter or LinkedIn.

OfficeIMO is a family of lightweight, cross‑platform .NET libraries that make working with Office file formats easier using the Open XML SDK — no Office/COM required.

- Word: create and edit .docx documents with a friendly API
- Excel: fast read/write helpers, tables, styles, ranges, fluent composers
- CSV: fluent, typed CSV document model with schema validation, mapping, streaming
- PowerPoint: build .pptx slides programmatically
- Visio: basic .vsdx diagrams

Each project ships as its own NuGet package under the MIT license.

## Project READMEs

- Word → `OfficeIMO.Word/README.md`
- Excel → `OfficeIMO.Excel/README.md`
- CSV → `OfficeIMO.CSV/README.md`
- PowerPoint → `OfficeIMO.PowerPoint/README.md`
- Visio → `OfficeIMO.Visio/README.md`
- Converters: `OfficeIMO.Word.Html` — HTML ↔ Word
- `OfficeIMO.Word.Markdown` — Markdown ↔ Word
- `OfficeIMO.Word.Pdf` — PDF export for Word

Reader:

- `OfficeIMO.Reader` — unified, read-only extraction facade for AI ingestion (Word/Excel/PowerPoint/Markdown/PDF)

Modular reader preview (internal, not published yet):

- `OfficeIMO.Zip` — safe ZIP traversal primitives
- `OfficeIMO.Epub` — reusable EPUB extraction primitives
- `OfficeIMO.Reader.Zip` — ZIP adapter into `ReaderChunk`
- `OfficeIMO.Reader.Epub` — EPUB adapter into `ReaderChunk`
- `OfficeIMO.Reader.Text` — structured text path (CSV/JSON/XML)
- `OfficeIMO.Reader.Html` — HTML adapter (HTML -> Word -> Markdown)
- roadmap: `Docs/officeimo.reader.modular-roadmap.md`

## Targets

- Word, PowerPoint, Visio: netstandard2.0, net472, net8.0 (Linux/macOS: net8.0); select projects also net9.0
- Excel: netstandard2.0, net472, net48, net8.0/net9.0 (cross‑platform)
- CSV: netstandard2.0, net472, net8.0, net9.0 (cross‑platform, streaming capable)

## AOT / Trimming

- Reflection-heavy APIs remain for dynamic/PowerShell scenarios.
- For NativeAOT, prefer explicit selectors and typed overloads (e.g., `ExcelSheet.InsertObjects` with selectors, `TableBuilder.FromSequenceAuto `, `FrontMatterBlock.FromObject `).

## Build & Coverage

- CI (Windows/Linux/macOS): single workflow badge above
- Coverage: Codecov dashboard linked above

## Licenses

All OfficeIMO packages are MIT‑licensed with exception of Visio which is not yet licensed. See individual project READMEs for third‑party dependency licenses (Open XML SDK, ImageSharp, AngleSharp, QuestPDF, SkiaSharp, etc.).

## Dependencies at a glance

Below are product‑centric graphs. Arrows point from a package to what it depends on.

### Word

```
flowchart TB
  WCore[OfficeIMO.Word]
  subgraph Extensions
    WHtml[OfficeIMO.Word.Html]
    WMd[OfficeIMO.Word.Markdown]
    WPdf[OfficeIMO.Word.Pdf]
  end

  %% External deps
  Angle[AngleSharp]
  AngleCss[AngleSharp.Css]
  OfficeIMO.Markdown
  Quest[QuestPDF]
  Skia[SkiaSharp]

  %% Core to extensions (install these when you need that capability)
  WCore --> WHtml
  WCore --> WMd
  WCore --> WPdf

  %% Extension uses
  WMd --> WHtml

  %% External dependencies per extension
  WHtml --> Angle
  WHtml --> AngleCss
  WMd   --> OfficeIMO.Markdown
  WPdf  --> Quest
  WPdf  --> Skia
```

> Converters (Word.Html, Word.Markdown, Word.Pdf) are actively developed and will be released to NuGet once quality and test coverage goals are met. They ship in‑repo for early evaluation.

```

```

### Excel

```
flowchart TD
  Xl[OfficeIMO.Excel]
  OXml[DocumentFormat.OpenXml]
  ImgSharp[SixLabors.ImageSharp]
  Fonts[SixLabors.Fonts]

  Xl --> OXml
  Xl --> ImgSharp
  Xl --> Fonts
```

### PowerPoint

```
flowchart TD
  Ppt[OfficeIMO.PowerPoint]
  OXml[DocumentFormat.OpenXml]

  Ppt --> OXml
```

### Visio

```
flowchart TD
  Vsdx[OfficeIMO.Visio]
  ImgSharp[SixLabors.ImageSharp]
  Pkg[System.IO.Packaging]

  Vsdx --> ImgSharp
  Vsdx --> Pkg
```

### When do I need what?

- Only editing/creating Word (.docx): add `OfficeIMO.Word`.
- Word → PDF export: add `OfficeIMO.Word` + `OfficeIMO.Word.Pdf` (pulls QuestPDF + SkiaSharp).
- Word ↔ HTML: add `OfficeIMO.Word` + `OfficeIMO.Word.Html` (pulls AngleSharp + AngleSharp.Css).
- Word ↔ Markdown: add `OfficeIMO.Word` + `OfficeIMO.Word.Markdown` (uses OfficeIMO.Markdown and `OfficeIMO.Word.Html`).
- Excel read/write, tables, styles: add `OfficeIMO.Excel` (pulls ImageSharp + Fonts for sizing and header images).
- PowerPoint slides: add `OfficeIMO.PowerPoint`.
- Visio drawings: add `OfficeIMO.Visio` (uses ImageSharp and System.IO.Packaging).

## Dependency versions (high‑level)

- DocumentFormat.OpenXml: 3.3.x (constraints: [3.3.0, 4.0.0))
- SixLabors.ImageSharp: 2.1.x; SixLabors.Fonts: 1.0.x (Excel)
- AngleSharp: 1.3.x; AngleSharp.Css: 1.0.0‑beta.154 (Word.Html)
- QuestPDF: 2025.7.x; SkiaSharp: 3.119.x (Word.Pdf)

We keep package ranges conservative to avoid breaking changes; see each project’s csproj for exact ranges.

## Licenses

- OfficeIMO.Word, OfficeIMO.Excel, OfficeIMO.PowerPoint, OfficeIMO.Word.Html, OfficeIMO.Word.Markdown, OfficeIMO.Word.Pdf: MIT
- OfficeIMO.Visio: License TBD (not MIT yet)

Third‑party dependency licenses: see their upstream repos (Open XML SDK, SixLabors, AngleSharp, QuestPDF, SkiaSharp).

## Support This Project

If you find this project helpful, please consider supporting its development.
Your sponsorship will help the maintainers dedicate more time to maintenance and new feature development for everyone.

It takes a lot of time and effort to create and maintain this project.
By becoming a sponsor, you can help ensure that it stays free and accessible to everyone who needs it.

To become a sponsor, you can choose from the following options:

- [Become a sponsor via GitHub Sponsors ❤️](https://github.com/sponsors/PrzemyslawKlys)
- [Become a sponsor via PayPal ❤️](https://paypal.me/PrzemyslawKlys)

Your sponsorship is completely optional and not required for using this project.
We want this project to remain open-source and available for anyone to use for free,
regardless of whether they choose to sponsor it or not.

If you work for a company that uses our .NET libraries or PowerShell modules, please consider sponsoring.
Thank you for considering support!

## Please share with the community

Please consider sharing a post about OfficeIMO and the value it provides. It really does help, and any mention on your preferred community or social platform is appreciated.

## Features

See individual project READMEs for detailed capability lists and code samples.

<!-- PowerForge markdown source sha256:7E494B37C2BB828DA741ADC16EA1223289C3FB233E28A6FCEE91C4E10A445C49; title=True -->

<!-- PowerForge markdown artifact sha256:E7119A37BA909A81B33792DE25A9063BC54E78C64E6F50B6A11965E0133B4E86 -->
