OfficeIMO 3.6.1
Prefix Reserveddotnet add package OfficeIMO --version 3.6.1
NuGet\Install-Package OfficeIMO -Version 3.6.1
<PackageReference Include="OfficeIMO" Version="3.6.1" />
<PackageVersion Include="OfficeIMO" Version="3.6.1" />
<PackageReference Include="OfficeIMO" />
paket add OfficeIMO --version 3.6.1
#r "nuget: OfficeIMO, 3.6.1"
#:package OfficeIMO@3.6.1
#addin nuget:?package=OfficeIMO&version=3.6.1
#tool nuget:?package=OfficeIMO&version=3.6.1
OfficeIMO
OfficeIMO is the one-reference package for documents in .NET: Word, Excel, PowerPoint, PDF and Markdown, the conversions between them, OfficeConverter for files and folders, and the document reader for search and AI ingestion. It runs without Microsoft Office.
dotnet add package OfficeIMO
Targets netstandard2.0, net8.0 and net10.0, plus net472 on Windows, so .NET Framework applications get the same conversion routes. To keep a dependency small, reference the individual format packages instead.
Render page images
Use a loaded document's ToImage for one surface or ToImages for a batch. Both return OfficeImageExportResult with encoded Bytes, dimensions and diagnostics. SaveAsImage and SaveAsImages persist output and return conversion reports. The owning format's options inherit shared density, fonts, selection, limits and cancellation policies. Image rendering lists adapter packages and examples.
The package capability catalog describes available library routes; OfficeConverter.Routes lists the routes executable by OfficeConverter and registered adapters. Its single-file Convert operation does not turn an image route into a page directory or ZIP. Use the owning SaveAsImages API for page files.
Create documents and save them as PDF
using OfficeIMO;
using OfficeIMO.Excel;
using OfficeIMO.Excel.Pdf;
using OfficeIMO.Word;
using OfficeIMO.Word.Pdf;
Sale[] sales = [new("North", 182_400m), new("South", 141_900m), new("West", 97_300m)];
using (var report = WordDocument.Create("Sales.docx")) {
report.AddHeading("Quarterly sales", level: 1);
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 })) {
book.AddSheet("Sales").AddTable(sales);
book.Save();
book.SaveAsPdf("Sales-workbook.pdf");
}
record Sale(string Region, decimal Revenue);
Convert files
OfficeConverter.Convert picks the route from the file extensions and returns an OfficeConversionReport:
using OfficeIMO;
OfficeConversionReport report = OfficeConverter.Convert("Sales.docx", "Sales.md",
new OfficeConversionOptions { FileConflictPolicy = OfficePublicationPolicy.Replace, FailOnLoss = false });
foreach (OfficeDiagnostic diagnostic in report.Diagnostics) {
Console.WriteLine($"{diagnostic.Severity} {diagnostic.Code}: {diagnostic.Message}");
}
By default an existing output is not replaced; FileConflictPolicy changes that. FailOnLoss = true stops a conversion before it writes anything the target cannot carry. OfficeConversionOptions.WordSave, ExcelSave and PowerPointSave set native save options, such as passwords, on the output.
Conversion preserves the source appearance by default. To give a plain document a selected appearance, pass an explicit theme:
OfficeConverter.Convert("Notes.md", "Notes.pdf", new OfficeConversionOptions {
Theme = OfficeTheme.Boardroom
});
The common Theme option supports Word to PDF, HTML and native Word formats; Word 2003 XML and Flat OPC XML to Word; Markdown to Word, PDF and HTML; HTML to Word and PDF; and the registered Word/RTF, RTF/Word, RTF/PDF and RTF/HTML routes. Explicit adapter themes and authored HTML CSS take precedence. A route that cannot carry the theme rejects the request before writing output. In-memory folder batches accept themes; saved batch settings and resumable checkpoints reject them because their portable format does not store a theme.
Convert a folder
using OfficeIMO;
OfficeBatchReport batch = await OfficeConverter.ConvertAsync(
Directory.EnumerateFiles("Reports", "*.docx"),
outputDirectory: "Pdf",
target: OfficeDocumentFormat.Pdf,
new OfficeBatchOptions { MaxParallelism = 4, ResumeFrom = "Pdf/.officeimo-batch.json" });
Console.WriteLine($"{batch.Summary.Completed} converted, {batch.Summary.Reused} already done, {batch.Summary.Failed} failed");
foreach (OfficeBatchItemReport item in batch.Items) {
Console.WriteLine($"{item.Status} {item.InputPath} -> {item.OutputPath}");
}
With ResumeFrom, a rerun reuses verified outputs from the checkpoint and converts only what is missing; RetryFailed retries recorded failures. The checkpoint format and saved options are the same on every framework.
Convert in memory
To{Format}() returns the target document model; the async form returns the model and its report together:
using OfficeIMO;
using OfficeIMO.Markdown;
using OfficeIMO.Word;
using OfficeIMO.Word.Markdown;
using MarkdownDocument source = MarkdownDocument.Parse("# Quarterly review\n\n- Revenue up 12%\n- Two open risks");
OfficeConversionResult<WordDocument> converted = await source.ToWordAsync();
using WordDocument word = converted.Value;
converted.Report.ThrowIfLoss();
word.Save("Review.docx");
Inspect any document
using OfficeIMO;
OfficeDocumentInfo info = OfficeDocument.Inspect("Review.docx", new OfficeInspectOptions { IncludeContent = false });
Console.WriteLine(info.Source);
OfficeIMO.Workflows and OfficeIMO.Workflows.IWork add further routes, such as Apple iWork files, through RegisterConversions().
See the repository README for the package map and the migration guide when upgrading.
Generated capability summary
This table is generated from the package-neutral OfficeIMO operation catalog. The detailed source contracts remain authoritative for feature-level behavior and limitations.
| Operation | Supported | Partial | Preserved | Rejected | Unsupported | Not applicable |
|---|---|---|---|---|---|---|
| Convert | 0 | 29 | 0 | 0 | 0 | 0 |
The complete rows for OfficeIMO are published in the generated operation contract.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 is compatible. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.7.2
- OfficeIMO.Core (>= 3.6.1)
- OfficeIMO.CSV (>= 3.6.1)
- OfficeIMO.Excel (>= 3.6.1)
- OfficeIMO.Excel.Pdf (>= 3.6.1)
- OfficeIMO.Html.Pdf (>= 3.6.1)
- OfficeIMO.Markdown (>= 3.6.1)
- OfficeIMO.Markdown.Html (>= 3.6.1)
- OfficeIMO.Markdown.Pdf (>= 3.6.1)
- OfficeIMO.Pdf (>= 3.6.1)
- OfficeIMO.Pdf.Excel (>= 3.6.1)
- OfficeIMO.Pdf.Ocr (>= 3.6.1)
- OfficeIMO.Pdf.PowerPoint (>= 3.6.1)
- OfficeIMO.Pdf.Word (>= 3.6.1)
- OfficeIMO.PowerPoint (>= 3.6.1)
- OfficeIMO.PowerPoint.Html (>= 3.6.1)
- OfficeIMO.PowerPoint.Pdf (>= 3.6.1)
- OfficeIMO.Reader.All (>= 3.6.1)
- OfficeIMO.Word (>= 3.6.1)
- OfficeIMO.Word.Html (>= 3.6.1)
- OfficeIMO.Word.Markdown (>= 3.6.1)
- OfficeIMO.Word.Pdf (>= 3.6.1)
-
.NETStandard 2.0
- OfficeIMO.Core (>= 3.6.1)
- OfficeIMO.CSV (>= 3.6.1)
- OfficeIMO.Excel (>= 3.6.1)
- OfficeIMO.Excel.Pdf (>= 3.6.1)
- OfficeIMO.Html.Pdf (>= 3.6.1)
- OfficeIMO.Markdown (>= 3.6.1)
- OfficeIMO.Markdown.Html (>= 3.6.1)
- OfficeIMO.Markdown.Pdf (>= 3.6.1)
- OfficeIMO.Pdf (>= 3.6.1)
- OfficeIMO.Pdf.Excel (>= 3.6.1)
- OfficeIMO.Pdf.Ocr (>= 3.6.1)
- OfficeIMO.Pdf.PowerPoint (>= 3.6.1)
- OfficeIMO.Pdf.Word (>= 3.6.1)
- OfficeIMO.PowerPoint (>= 3.6.1)
- OfficeIMO.PowerPoint.Html (>= 3.6.1)
- OfficeIMO.PowerPoint.Pdf (>= 3.6.1)
- OfficeIMO.Reader.All (>= 3.6.1)
- OfficeIMO.Word (>= 3.6.1)
- OfficeIMO.Word.Html (>= 3.6.1)
- OfficeIMO.Word.Markdown (>= 3.6.1)
- OfficeIMO.Word.Pdf (>= 3.6.1)
-
net10.0
- OfficeIMO.Core (>= 3.6.1)
- OfficeIMO.CSV (>= 3.6.1)
- OfficeIMO.Excel (>= 3.6.1)
- OfficeIMO.Excel.Pdf (>= 3.6.1)
- OfficeIMO.Html.Pdf (>= 3.6.1)
- OfficeIMO.Markdown (>= 3.6.1)
- OfficeIMO.Markdown.Html (>= 3.6.1)
- OfficeIMO.Markdown.Pdf (>= 3.6.1)
- OfficeIMO.Pdf (>= 3.6.1)
- OfficeIMO.Pdf.Excel (>= 3.6.1)
- OfficeIMO.Pdf.Ocr (>= 3.6.1)
- OfficeIMO.Pdf.PowerPoint (>= 3.6.1)
- OfficeIMO.Pdf.Word (>= 3.6.1)
- OfficeIMO.PowerPoint (>= 3.6.1)
- OfficeIMO.PowerPoint.Html (>= 3.6.1)
- OfficeIMO.PowerPoint.Pdf (>= 3.6.1)
- OfficeIMO.Reader.All (>= 3.6.1)
- OfficeIMO.Word (>= 3.6.1)
- OfficeIMO.Word.Html (>= 3.6.1)
- OfficeIMO.Word.Markdown (>= 3.6.1)
- OfficeIMO.Word.Pdf (>= 3.6.1)
-
net8.0
- OfficeIMO.Core (>= 3.6.1)
- OfficeIMO.CSV (>= 3.6.1)
- OfficeIMO.Excel (>= 3.6.1)
- OfficeIMO.Excel.Pdf (>= 3.6.1)
- OfficeIMO.Html.Pdf (>= 3.6.1)
- OfficeIMO.Markdown (>= 3.6.1)
- OfficeIMO.Markdown.Html (>= 3.6.1)
- OfficeIMO.Markdown.Pdf (>= 3.6.1)
- OfficeIMO.Pdf (>= 3.6.1)
- OfficeIMO.Pdf.Excel (>= 3.6.1)
- OfficeIMO.Pdf.Ocr (>= 3.6.1)
- OfficeIMO.Pdf.PowerPoint (>= 3.6.1)
- OfficeIMO.Pdf.Word (>= 3.6.1)
- OfficeIMO.PowerPoint (>= 3.6.1)
- OfficeIMO.PowerPoint.Html (>= 3.6.1)
- OfficeIMO.PowerPoint.Pdf (>= 3.6.1)
- OfficeIMO.Reader.All (>= 3.6.1)
- OfficeIMO.Word (>= 3.6.1)
- OfficeIMO.Word.Html (>= 3.6.1)
- OfficeIMO.Word.Markdown (>= 3.6.1)
- OfficeIMO.Word.Pdf (>= 3.6.1)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on OfficeIMO:
| Package | Downloads |
|---|---|
|
OfficeIMO.Workflows
Typed local document workflows that compose first-party OfficeIMO conversion, PDF, and provenance capabilities. |
GitHub repositories
This package is not used by any popular GitHub repositories.