Mythosia.Documents.Office
1.1.1
dotnet add package Mythosia.Documents.Office --version 1.1.1
NuGet\Install-Package Mythosia.Documents.Office -Version 1.1.1
<PackageReference Include="Mythosia.Documents.Office" Version="1.1.1" />
<PackageVersion Include="Mythosia.Documents.Office" Version="1.1.1" />
<PackageReference Include="Mythosia.Documents.Office" />
paket add Mythosia.Documents.Office --version 1.1.1
#r "nuget: Mythosia.Documents.Office, 1.1.1"
#:package Mythosia.Documents.Office@1.1.1
#addin nuget:?package=Mythosia.Documents.Office&version=1.1.1
#tool nuget:?package=Mythosia.Documents.Office&version=1.1.1
Mythosia.Documents.Office
Office document loaders for Word (.docx), Excel (.xlsx), and PowerPoint (.pptx). Parses documents into DoclingDocument structured models via OpenXml.
Stable file identity
Included in v1.1.1; see the package release notes.
Registering the same file through a relative path and an absolute path must update one document, while same-named files in different folders must stay separate. WordDocumentLoader, ExcelDocumentLoader, PowerPointDocumentLoader and PdfDocumentLoader now set DoclingDocument.Source to the normalized absolute file path, as the built-in TXT loaders do. RAG derives automatic document IDs from this value; explicit IDs remain caller-controlled. Default citations may therefore show absolute paths.
Previously stored relative-path IDs are not migrated or deleted automatically. Identify the old document ID, explicitly remove only that document from the relevant store and reindex it. Alternatively, index the complete source set into a new empty collection, validate it and switch the application to it. Reindexing only the new absolute-path ID in the existing collection leaves the old records behind. Do not delete unrelated documents. See document identity and migration.
Installation
dotnet add package Mythosia.Documents.Office
Quick Start
using Mythosia.Documents.Office.Word;
var loader = new WordDocumentLoader();
IReadOnlyList<DoclingDocument> docs = await loader.LoadAsync("docs/report.docx");
string markdown = docs[0].ToMarkdown();
With RAG Pipeline
var service = new AnthropicService(apiKey, httpClient)
.WithRag(rag => rag
.AddDocuments(new WordDocumentLoader(), "docs/report.docx")
);
// Or auto-select loader by extension:
var service = new AnthropicService(apiKey, httpClient)
.WithRag(rag => rag.AddDocument("docs/report.docx"));
Loaders
| Loader | Extensions | Namespace |
|---|---|---|
WordDocumentLoader |
.docx | Mythosia.Documents.Office.Word |
ExcelDocumentLoader |
.xlsx | Mythosia.Documents.Office.Excel |
PowerPointDocumentLoader |
.pptx | Mythosia.Documents.Office.PowerPoint |
Structured Extraction
The OpenXml parsers produce a structured DoclingDocument that can be serialized to Markdown or consumed directly by a RAG pipeline.
- Word: headings are tracked with a hierarchy stack, so equal-level headings stay siblings, lower-level headings nest under the nearest parent heading, and document titles reset the heading stack.
- Word tables: tables are attached to the current heading/title context and preserve basic row, column, and span information.
- PowerPoint: slide text shapes and table graphic frames are read in document order, preserving sequences such as text → table → text in Markdown output.
- PowerPoint titles and lists: title placeholders become section headings, and bullet/numbered paragraphs become list items.
- Excel: workbook cells are parsed into structured table data, with optional sheet-name context.
Parser Options
using Mythosia.Documents.Office;
using Mythosia.Documents.Office.Excel;
var options = new OfficeParserOptions
{
IncludeMetadata = true, // Extract title, author, etc.
NormalizeWhitespace = true, // Collapse excessive whitespace
IncludeSheetNames = true, // Sheet names in Excel output
IncludeSlideNumbers = true, // Slide numbers in PowerPoint output
};
var loader = new ExcelDocumentLoader(options: options);
Custom Parser
Implement IDocumentParser and pass it to the loader:
var loader = new WordDocumentLoader(parser: new MyCustomWordParser());
Related Packages
| Package | Description |
|---|---|
| Mythosia.Documents.Abstractions | Core abstractions (DoclingDocument, IDocumentLoader) |
| Mythosia.Documents.Pdf | PDF loader |
| Mythosia.AI.Rag | RAG pipeline |
| 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 was computed. 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 was computed. 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 | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.1 is compatible. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- DocumentFormat.OpenXml (>= 3.5.1)
- Mythosia.Documents.Abstractions (>= 1.2.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Mythosia.Documents.Office:
| Package | Downloads |
|---|---|
|
Mythosia.AI.Rag
Ground AI answers in application-managed documents with loading, splitting, embeddings, vector/text/hybrid retrieval, reranking and metadata filters. Provides standard and Agentic RAG, streaming runs, cancellation and optional PIXIE search. Supports Voyage Context 4, Gemini Embedding 2, OpenAI, Ollama and Perplexity embeddings. Retrieval-aware providers distinguish documents from queries and receive complete ordered document inputs; existing IEmbeddingProvider implementations remain compatible. Validates embedding results before document replacement and isolates query rewriting and reranking. Depends on Mythosia.AI.Abstractions and Mythosia.AI.Rag.Abstractions without referencing the full Mythosia.AI implementation. What's New in v8.3.0: Diagnostics use optional IVectorStoreDiagnostics and InMemory 4.3.0; migrate old InMemory diagnostic interface casts. This minor release intentionally includes a breaking interface migration. |
GitHub repositories
This package is not used by any popular GitHub repositories.
v1.1.1: Uses normalized absolute file paths as DoclingDocument.Source for stable RAG automatic IDs and separation of same-named files in different folders. Explicit IDs remain unchanged; default citations may show absolute paths. Existing relative-path records are not automatically migrated or removed; delete only identified old document IDs before reindexing, or rebuild a complete source set into a new collection. Skips missing worksheet/slide parts instead of dereferencing them. Full notes: https://github.com/AJ-comp/Mythosia.AI/blob/main/src/loaders/Mythosia.Documents.Office/RELEASE_NOTES.md#v111