OfficeIMO is a family of COM-free .NET libraries for creating, reading, converting, and exporting Office and document formats. The packages are designed for services, desktop apps, build agents, and automation hosts where Microsoft Office automation is not available or not appropriate.
If OfficeIMO saves you time, please consider supporting the work through GitHub Sponsors or PayPal. Sponsorship helps keep the libraries maintained, tested, and MIT licensed.
PowerShell users should start with EvotecIT/PSWriteOffice, which is the PowerShell-facing project built around OfficeIMO.
| Package | Purpose |
|---|---|
| OfficeIMO.Word | Create, edit, inspect, and convert .docx documents, with first-party support for a tested legacy .doc subset. |
| OfficeIMO.Excel | Create and modify .xlsx workbooks, open legacy .xls workbooks, worksheets, tables, ranges, styles, and reports. |
| OfficeIMO.PowerPoint | Generate .pptx presentations programmatically. |
| OfficeIMO.Visio | Create, inspect, validate, and export .vsdx diagrams without Visio automation. |
| OfficeIMO.Pdf | Dependency-free PDF creation, reading, inspection, page operations, and converter engine support. |
| OfficeIMO.OpenDocument | Native ODT, ODS, and ODP creation, editing, inspection, and preservation. |
| OfficeIMO.Rtf | Bounded RTF parser, lossless syntax tree, editable semantic model, writer, and conversion reports. |
| OfficeIMO.Markdown | Typed Markdown AST, builder API, reader, and HTML renderer. |
| OfficeIMO.Reader | Unified read-only extraction facade with modular adapters. |
| Package | Purpose |
|---|---|
| OfficeIMO.Word.Html | Word to/from HTML conversion. |
| OfficeIMO.Word.Markdown | Word to/from Markdown conversion. |
| OfficeIMO.Word.Pdf | Word to PDF through OfficeIMO.Pdf. |
| OfficeIMO.Word.OpenDocument | Explicit Word/ODT conversion with feature-mapping reports. |
| OfficeIMO.Word.Rtf | Result-bearing Word/RTF conversion, mail merge, fields, merge, and comparison workflows. |
| OfficeIMO.Excel.Pdf | Excel workbook to PDF through OfficeIMO.Pdf. |
| OfficeIMO.Excel.OpenDocument | Explicit Excel/ODS conversion with bounded sparse expansion and feature-mapping reports. |
| OfficeIMO.PowerPoint.Pdf | PowerPoint presentation to PDF through OfficeIMO.Pdf. |
| OfficeIMO.PowerPoint.OpenDocument | Explicit PowerPoint/ODP conversion with feature-mapping reports. |
| OfficeIMO.Markdown.Html | HTML to Markdown document conversion. |
| OfficeIMO.Markdown.Pdf | Markdown to PDF through OfficeIMO.Pdf. |
| OfficeIMO.Html.Pdf | Direct HTML-to-PDF rendering and PDF-to-HTML projection. |
| OfficeIMO.Html | Shared HTML parsing, resource policy, layout, PNG/SVG rendering, and HTML-to/from-RTF. |
| OfficeIMO.Rtf.Pdf | Visual RTF-to-PDF export and extractive PDF-to-RTF import. |
| Package | Purpose |
|---|---|
| OfficeIMO.Markup | Markdown-inspired semantic authoring model for OfficeIMO documents. |
| OfficeIMO.Markup.Word | Render markup documents to Word. |
| OfficeIMO.Markup.Excel | Render markup documents to Excel workbooks. |
| OfficeIMO.Markup.PowerPoint | Render markup documents to PowerPoint presentations. |
| OfficeIMO.Markup.Cli | CLI parser, validator, preview, and code-emission tooling. |
| OfficeIMO.MarkdownRenderer | Browser/WebView-friendly Markdown rendering shell. |
| OfficeIMO.MarkdownRenderer.Wpf | WPF/WebView2 Markdown host control. |
| OfficeIMO.MarkdownRenderer.IntelligenceX | IntelligenceX renderer feature pack. |
| OfficeIMO.MarkdownRenderer.SamplePlugin | Sample third-party-style renderer plug-in package. |
| Package | Purpose |
|---|---|
| OfficeIMO.Reader | Common extraction model and folder/stream helpers. |
| OfficeIMO.Reader.Csv | CSV/TSV reader adapter. |
| OfficeIMO.Reader.Epub | EPUB reader adapter. |
| OfficeIMO.Reader.Html | HTML reader adapter. |
| OfficeIMO.Reader.Json | JSON reader adapter. |
| OfficeIMO.Reader.OpenDocument | Native ODT, ODS, and ODP reader adapter. |
| OfficeIMO.Reader.Ocr.Process | Optional versioned external-process OCR provider. |
| OfficeIMO.Reader.Ocr.Tesseract | Optional Tesseract CLI OCR provider. |
| OfficeIMO.Reader.Pdf | PDF reader adapter. |
| OfficeIMO.Reader.Rtf | Bounded RTF chunks, tables, visuals, warnings, and provenance. |
| OfficeIMO.Reader.Visio | Visio inspection snapshot adapter. |
| OfficeIMO.Reader.Xml | XML reader adapter. |
| OfficeIMO.Reader.Yaml | YAML reader adapter. |
| OfficeIMO.Reader.Zip | ZIP traversal reader adapter. |
| Package | Purpose |
|---|---|
| OfficeIMO.GoogleWorkspace | Shared Google Workspace credentials, sessions, retry, Drive location, and translation reporting. |
| OfficeIMO.Word.GoogleDocs | Word to Google Docs planning and export scaffolding. |
| OfficeIMO.Excel.GoogleSheets | Excel to Google Sheets planning and export scaffolding. |
| OfficeIMO.CSV | Fluent CSV document model. |
| OfficeIMO.Drawing | Shared color, image, font, and drawing primitives. |
| OfficeIMO.Zip | Safe ZIP traversal primitives. |
| OfficeIMO.Epub | EPUB extraction primitives. |
Install only the packages you need:
dotnet add package OfficeIMO.Word
dotnet add package OfficeIMO.Excel
dotnet add package OfficeIMO.PowerPoint
dotnet add package OfficeIMO.OpenDocument
dotnet add package OfficeIMO.PdfConverter packages are intentionally separate so applications can opt into the extra dependency surface only when needed:
dotnet add package OfficeIMO.Word.Pdf
dotnet add package OfficeIMO.Word.OpenDocument
dotnet add package OfficeIMO.Excel.Pdf
dotnet add package OfficeIMO.Excel.OpenDocument
dotnet add package OfficeIMO.PowerPoint.OpenDocument
dotnet add package OfficeIMO.Markdown.Pdfusing OfficeIMO.Word;
using var document = WordDocument.Create("report.docx");
document.AddParagraph("OfficeIMO").SetBold();
document.AddParagraph("Created without Microsoft Office automation.");
document.Save();using OfficeIMO.Excel;
using var workbook = ExcelDocument.Create("sales.xlsx");
var sheet = workbook.AddWorksheet("Sales");
sheet.CellValue(1, 1, "Product");
sheet.CellValue(1, 2, "Revenue");
sheet.CellValue(2, 1, "Alpha");
sheet.CellValue(2, 2, 120);
sheet.CellValue(3, 1, "Beta");
sheet.CellValue(3, 2, 92);
sheet.AddTable("A1:B3", hasHeader: true, name: "SalesTable", style: TableStyle.TableStyleMedium2);
sheet.AutoFitColumns();
workbook.Save();using OfficeIMO.CSV;
List<Person> people = CsvDocument.Load("people.csv")
.EnsureSchema(schema => schema
.Column("Id").AsInt32().Required()
.Column("Name").AsString().Required())
.ValidateOrThrow()
.Map<Person>(map => map
.FromColumn<int>("Id", (person, value) => { person.Id = value; return person; })
.FromColumn<string>("Name", (person, value) => { person.Name = value; return person; }))
.ToList();
public sealed class Person {
public int Id { get; set; }
public string Name { get; set; } = "";
}using OfficeIMO.Word;
using OfficeIMO.Word.Pdf;
using var document = WordDocument.Load("proposal.docx");
document.SaveAsPdf("proposal.pdf");using OfficeIMO.Pdf;
using var source = PdfDocument.Open("packet.pdf");
string firstPageText = source.Read.Text("1");
source.Pages.Extract("1-3").Save("packet-summary.pdf");
PdfDocument.Open("packet.pdf")
.MergeWith("appendix.pdf")
.Pages.Delete("2")
.Stamp.Text("Reviewed")
.Save("packet-final.pdf");using OfficeIMO.Excel.Pdf;
using OfficeIMO.Word.Pdf;
PdfExcelTableConverterExtensions.SaveAsExcelFromPdfTables(
"statement.pdf",
"statement-tables.xlsx");
PdfWordTableConverterExtensions.SaveAsWordFromPdfTables(
"statement.pdf",
"statement-tables.docx");using OfficeIMO.Markdown.Pdf;
"# Status\n\nGenerated by OfficeIMO."
.SaveAsPdfFromMarkdown("status.pdf");using OfficeIMO.Html;
using OfficeIMO.Html.Pdf;
string html = "<h1>Status</h1><p>Generated by OfficeIMO.</p>";
var options = new HtmlPdfSaveOptions {
Margins = HtmlRenderMargins.All(32)
};
byte[] pdf = html.ToPdf(options);
byte[] png = html.ToPng(options);
string svg = html.ToSvg(options);
var pdfResult = html.ToPdfDocumentResult(options);
var pngResult = html.ToPngResult(options);
var svgResult = html.ToSvgResult(options);
html.SaveAsPdf("status.pdf", options);
html.SaveAsPng("status.png", options);
html.SaveAsSvg("status.svg", options);using OfficeIMO.Reader;
using OfficeIMO.Reader.Pdf;
using OfficeIMO.Reader.Zip;
OfficeDocumentReader reader = new OfficeDocumentReaderBuilder()
.AddPdfHandler()
.AddZipHandler()
.Build();
var chunks = reader.ReadFolder("KnowledgeBase",
new ReaderFolderOptions {
Recurse = true,
MaxFiles = 500,
DeterministicOrder = true
},
new ReaderOptions {
MaxChars = 8_000,
ComputeHashes = true
}).ToList();using OfficeIMO.Visio;
using OfficeIMO.Visio.Diagrams;
VisioDocument.Create("network.vsdx")
.NetworkTopologyDiagram("Branch topology", topology => topology
.Title()
.Root("internet", "Internet", VisioNetworkNodeKind.Internet)
.Firewall("firewall", "Firewall")
.Switch("core", "Core Switch")
.Server("app", "App Server")
.Ethernet("internet", "firewall", "WAN")
.Trunk("firewall", "core")
.Trunk("core", "app"))
.Save();Most shipping libraries target netstandard2.0, net8.0, and net10.0. Some packages also include net472 or Windows-specific targets where the surface requires it. Check the package README or project file for exact targets.