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. |
| OfficeIMO.Excel | Create and modify .xlsx 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.Rtf | Dependency-free RTF parser, syntax tree, fluent document model, and writer. |
| 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.Rtf | Word to/from RTF through OfficeIMO.Rtf. |
| OfficeIMO.Excel.Pdf | Excel workbook to PDF through OfficeIMO.Pdf. |
| OfficeIMO.PowerPoint.Pdf | PowerPoint presentation to PDF through OfficeIMO.Pdf. |
| OfficeIMO.Markdown.Html | HTML to Markdown document conversion. |
| OfficeIMO.Markdown.Pdf | Markdown to PDF through OfficeIMO.Pdf. |
| OfficeIMO.Html.Pdf | HTML to PDF and PDF to HTML through OfficeIMO document models. |
| OfficeIMO.Html | Shared HTML ingestion plus HTML to/from RTF through OfficeIMO.Rtf. |
| OfficeIMO.Rtf.Pdf | RTF to/from PDF through the dependency-free OfficeIMO.Pdf engine. |
| 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.Pdf | PDF reader adapter. |
| OfficeIMO.Reader.Rtf | RTF reader adapter. |
| OfficeIMO.Reader.Text | Structured text compatibility adapter. |
| 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.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.Excel.Pdf
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.SavePdfTablesAsExcel(
"statement.pdf",
"statement-tables.xlsx");
PdfWordTableConverterExtensions.SavePdfTablesAsWord(
"statement.pdf",
"statement-tables.docx");using OfficeIMO.Markdown.Pdf;
"# Status\n\nGenerated by OfficeIMO.".SaveAsPdf("status.pdf");using OfficeIMO.Html.Pdf;
"<h1>Status</h1><p>Generated by OfficeIMO.</p>"
.SaveAsPdf("status-html.pdf", HtmlPdfSaveOptions.CreateDocumentProfile());using OfficeIMO.Reader;
using OfficeIMO.Reader.Pdf;
using OfficeIMO.Reader.Zip;
DocumentReaderPdfRegistrationExtensions.RegisterPdfHandler();
DocumentReaderZipRegistrationExtensions.RegisterZipHandler();
var chunks = DocumentReader.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.