SuperAPI AI Directory

OfficeAgent.NET

#️⃣ 🎖️ 🏠 ☁️ 🍎 🪟 🐧 - Edit Word (.docx) files on disk or SharePoint: tracked changes, tables, styles, comments and content controls, validated and previewed before saving.

Open website

About this tool

OfficeAgent.NET is a .NET document automation library built on the Open XML SDK for structured, verifiable manipulation of Word .docx, PowerPoint .pptx, and Excel .xlsx files. It turns document intent into typed, validated operations rather than directly assembling XML.

In terms of use, the library can be used to generate documents and presentations, make targeted edits, update tables, styles, and images, and manage comments and review state. It is aimed at .NET applications and coding agents that need to process Office Open XML files programmatically.

Key capabilities include: support for Word text, paragraphs, tables, images, styles, content controls, comment threads, footnotes and endnotes, page geometry and pagination, document properties, and revision marks; support for PowerPoint text, bullets, run and paragraph formatting, template slots, style copying, tables, images, text boxes, embedded video and audio, speaker notes, parseable comments, footers and slide numbers, sections, transitions and animations, and slide lifecycle (add, delete, reorder, duplicate); support for Excel formula editing (setting the workbook to recalculate when opened in Excel), with the optional package OfficeAgent.Excel.Calculation able to calculate a set of validated Excel functions and write the results as cached values.

In terms of usage, the same engine is offered in three forms: an MCP server for agents that support the Model Context Protocol; tools for the Microsoft Agent Framework and Microsoft.Extensions.AI; and a .NET API for applications that directly control workflows. Applications can use the engine directly without MCP. Each edit follows four steps: Inspect returns a structured map of the document; Find searches for text and returns content-verified anchors; Preview validates a plan against the current document and reports the proposed changes without writing; Apply submits the complete plan and saves it through the configured provider. A plan (DocumentPlan) is a typed, JSON-serializable list of operations. Anchors record both position and expected content, and if the content or an optional document snapshot has changed, validation fails rather than silently targeting a different position. All operations are either applied to one in-memory transaction or none are.

TextFiles are accessed through configured providers. After registration, edit calls use (connectionId, documentId) pairs instead of storage paths or credentials. The file system provider restricts registration to within its root directory; the SharePoint provider uses the permissions of its configured identity. CreateAsync creates a new document within a connection, and the requested .docx or .pptx extension selects the registered blank document factory.

Applicable scenarios include: generating documents and presentations, making targeted edits to existing documents, updating tables and styles, managing comments and review status, editing files on disk or SharePoint, building contract review agents, batch-generating quotes from templates, converting document differences into reviewable Word tracked changes, assembling multiple documents into one editable package, and more.

In terms of limitations: the library edits Word .docx, PowerPoint .pptx, and Excel .xlsx files, but does not automate Office desktop applications. The core engine does not render pages, does not calculate Word fields, and does not evaluate Excel formulas. Operations that depend on pagination, table of contents rendering, or field recalculation are outside the core scope. Preview reports structural changes. The optional rendering package can generate PDF-derived page images through an external process, but it cannot yet detect overflow or page fit issues. PresentationML has no revision model, so tracked changes are limited to Word. Animation only covers effects expressible as filtered p:animEffect; fly-in, zoom, and motion paths are rejected rather than approximated. The standalone server does not provide an authentication layer for HTTP hosting and must be placed behind authentication. The file system root directory is a trust boundary, and its ACL must prevent untrusted principals from creating, renaming, or replacing entries while the server is running. Token savings depend on the connection method: addressing documents by id keeps packages out of the conversation, and inspection can be narrowed through fidelity and pagination; the inline *_content tools are a deliberate exception, as they carry the entire file bidirectionally in base64, with token cost proportional to file size, making them suitable for a single self-contained call but not for a series of edits. Review guidance is optional: for review tasks, the server alone will not make the agent read unresolved comments or select tracked changes before editing; the word-document-review skill teaches that workflow.

The project uses the MIT license, is self-hostable, and collects no telemetry, analytics, or callback data. It only reads and writes documents in the givenfolder, SharePoint library, or session connection, and contacts no third party except that a host-configured SharePoint connection contacts Microsoft Graph. Commercial support and deployment assistance are provided by dotaction, a service independent of the project, governed by its own agreements, and does not change the library's license, compatibility commitments, or community support policies.