PowerTools for Open XML consists of example code and guidance for implementing various types of functionality using the Open XML document format. At one level, PowerTools for Open XML consists of PowerShell cmdlets that enable you to process Open XML documents in interesting ways. At a deeper level, PowerTools provides C# source code that shows how to implement some interesting functionality using Open XML.

This page is the central repository for all PowerTools for Open XML content. Subscribe to the OpenXMLDeveloper RSS feed, follow OpenXmlDev, and EricWhiteDev on twitter, and subscribe to http://ericwhite.com/blog/feed/ to stay current with PowerTools progress.

PowerTools for Open XML was first released in June, 2008. Some of the content listed below applies to version 1.0, 2.0, or 2.2 of PowerTools for Open XML.  In many cases, that content is still relevant to PowerTools for Open XML 3.0, so you may find it interesting to review that material.

PowerTools for Open XML 3.0



Introduction to PowerTools for Open XML 3.0

The key enhancement for PowerTools for Open XML version 3.0 is that Cmdlets are now written using PowerShell script rather than C#. This makes it far easier to develop new ones and to enhance existing ones.  Follow the link to the left for a screen-cast that shows how to get started with this new version of PowerTools.


Download the PowerTools for Open XML 3.0.0 source code from CodePlex.

Screen-Cast: Writing PowerShell Cmdlets using PowerShell Script

This screen-cast explains the various techniques and coding patterns that we want to follow when implementing PowerTools for Open XML Cmdlets using PowerShell script. Shows how to write Cmdlets that create Open XML documents, query Open XML documents, and modify Open XML documents.

Using the ConvertTo-Base64 and ConvertFrom-Base64 Cmdlets

Sometimes we need to use a 'template' or 'source' Open XML document from within our C#, VB.NET, PowerShell, or JavaScript program. One convenient way is to convert the binary Open XML file to base 64 encoded ASCII, and to embed the document in our program as a string literal. This video explains why we want to do this, and explains the ConvertTo-Base64 Cmdlet that makes it easy for us to write this variety of code.

The New-Docx Cmdlet

As part of your research process as an Open XML developer, if you have the need to quickly generate a new DOCX that contains some aspect or feature of Open XML, the New-Docx Cmdlet will help you out.

PowerTools for Open XML 2.2



Announcing the release of PowerTools for Open XML 2.2

Highlights the key enhancements of PowerTools for Open XML version 2.2.


Download the PowerTools for Open XML 2.2.1 source code from CodePlex. The new version includes a spreadsheet pivot table example.

Screen-cast: Building, installing, and running PowerTools for Open XML 2.2

Short screen-cast that shows how to build and install PowerTools 2.2. Shows running a cmdlet to verify that the installation worked properly.

PowerTools for Open XML 2.0 Cmdlets

List of PowerTools for Open XML 2.2 cmdlets, with a short description of each one. Several of the cmdlets now have screen-casts recorded for them, so this is a good place to find out more about all of the cmdlets.

PowerTools 2.2 Code Design and Organization

Shows technical overview of the new code for PowerTools 2.2 cmdlets and core code.

Screen-Cast: Functional Programming Utility Methods and Classes for Open XML

Screen-cast that walks through the functions and classes in PtUtil.cs, which contains utility functionality that make it easier to work with Open XML using LINQ to XML.

Screen-Cast Creating Excel Pivot Tables

Screen-cast shows how to use the PowerTools methods to create pivot tables for Excel.

Screen-Cast Open XML Code to Create Pivot Tables

Screen-cast shows the Open XML code and elements needed to create a pivot table from scratch for Excel.

DocumentBuilder 2.0

DocumentBuilder 2.0 is a very important part of PowerTools for Open XML, and has its own resource center:

DocumentBuilder Resource Center

PowerTools for Open XML 1.1



Announcing the Release of PowerTools for Open XML V1.1

An introduction to PowerTools for Open XML 1.1.

Move/Insert/Delete Paragraphs in Word Processing Documents using the Open XML SDK

Provides a detailed explanation of DocumentBuilder 1.1.

Accepting Revisions in Open XML WordprocessingML Documents

Discusses the RevisionAccepter class.


PowerTools for Open XML 1.0



Automated Processing of Open XML Documents using PowerShell

An introduction to PowerTools for Open XML 1.0.