OpenDocx.NET 1.0.3

dotnet add package OpenDocx.NET --version 1.0.3
                    
NuGet\Install-Package OpenDocx.NET -Version 1.0.3
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="OpenDocx.NET" Version="1.0.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="OpenDocx.NET" Version="1.0.3" />
                    
Directory.Packages.props
<PackageReference Include="OpenDocx.NET" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add OpenDocx.NET --version 1.0.3
                    
#r "nuget: OpenDocx.NET, 1.0.3"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package OpenDocx.NET@1.0.3
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=OpenDocx.NET&version=1.0.3
                    
Install as a Cake Addin
#tool nuget:?package=OpenDocx.NET&version=1.0.3
                    
Install as a Cake Tool

OpenDocx.NET

A .NET library for document processing and templating with OpenXML. This package provides a low-level toolkit for transforming and assembling Word documents. It is layered on top of Eric White's excellent Open XML Power Tools, extending it with additional capabilities:

  • Flexible field syntax - Specify your own field delimiters and syntax for document templates
  • Basic field types - Supports content fields, nestable conditional logic (if/elseif/else/endif), and nestable lists (list/endlist) without imposing restrictions on field expressions
  • Template transformation - Convert DOCX files with your custom syntax into Open XML Power Tools-compatible templates by separating them into:
    • Logic tree (JSON) - Encapsulates the data structure and logical rules of the template
    • Optimized DOCX file - Ready for use with Open XML Power Tools' DocumentAssembler
  • Template optimization - Utilities for optimizing template logic
  • Multi-template assembly - Handles assembling and composing complex documents from multiple template sources

What's NOT Included

OpenDocx.NET is intentionally data-source agnostic. It doesn't know or care where your data is stored or how it's structured—it only cares about the data structure that your template requires.

This package does NOT include:

  • Data transformation tools for converting your source data into template-compatible formats
  • Database connectors or data access layers
  • Business logic for data processing or validation

What you need to provide: OpenDocx.NET generates a logic tree (a simple JSON structure) that describes exactly what data structure your template expects. It's your responsibility to transform your source data to match this structure and provide it as XML or JSON. Once you do that, OpenDocx.NET handles the rest—-assembling and composing even the most complex documents.

Features

  • Document assembly and templating
  • Field extraction and processing
  • Template transformation
  • Logic tree generation
  • Content control processing
  • Document validation

Installation

Install the package via NuGet Package Manager:

Install-Package OpenDocx

Or via .NET CLI:

dotnet add package OpenDocx

Usage

The OpenDocx library provides various classes for working with Word documents:

  • FieldExtractor - Extract fields from DOCX files and analyze template structure
  • Templater - Process templates and transform field syntax
  • Assembler - Perform document assembly operations using logic trees and data
  • Composer - Compose complex documents from multiple template sources
  • Validator - Validate document structure and template integrity

Requirements

  • .NET 6.0 or later
  • DocumentFormat.OpenXml 2.19.0 (compatibility with later versions not yet tested)

License

This project is licensed under the Mozilla Public License 2.0.

Contributing

This package is part of the OpenDocx.NET project. Please refer to the main repository for contribution guidelines.

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.3 93 1/3/2026
1.0.2 285 11/10/2025
1.0.1 199 11/5/2025
1.0.0 148 10/31/2025

Version 1.0.3 - Updated OpenXmlPowerTools-Net6 dependency to 4.6.25.