Using the Open XML SDK from within a Managed Add-In

When you are writing code for an Office managed add-in, you can use the Open XML SDK to manipulate the current document in a whole variety of ways.  This is a very powerful technique, which in some circumstances can give your application much better performance.  This is the key point behind the paper that Anil Kumar, Ansari M, Sarang Datye, and Sunil Kumar wrote, Increasing Performance of Word Automation for large amount of data using Open Xml SDK.  In that article, the authors provide the code to do exactly this.  Once you understand the mechanics of using the Open XML SDK from within Office automation, it opens up a set of scenarios that would be very difficult to otherwise implement because of performance limitations.

This blog is inactive.
New blog:

Blog TOC

Comments (2)

  1. FriendyAnil says:

    I also noticed when we call spreadSheet.AddWorkbookPart()

    the workbook inside workbookpart shows up as being set to nothing and i think that’s what’s causing

    spreadSheet.WorkbookPart.Workbook.GetFirstChild(Of Sheets)()

    to blow up

    i looked inside workbookpart object with reflector but it’s constructor is not creating a workbook

    i am confused

    <a href="; rel="dofollow">Jobs in Business</a>

  2. EricWhite says:

    Hi Anil,

    I think that your problem might be caused because the code that we initially posted worked with the Open XML SDK Dec CTP.  Anil Kumar updated the code to work with the RTM version of the Open XML SDK, and I posted the new code.  I updated the links in the blog post.

    Here is the link to download the updated code that uses the Open XML SDK in a managed add-in.