There are two namespaces to leverage on when developing office application
- System.IO.Packaging in WindowsBase assembly and it is part of .NET framework 3.0 and 3.5
- DocumentFormat.OpenXml.Packaging is in DocumentFormat.OpenXml assembly which is part of OpenXml SDK
Eric White has a very good post on the difference of the two namespaces
The two namespaces serve the same purpose as to provide API to navigate within OpenXml document package, the difference is that DocumentFormat.OpenXml.Packaging provides strongly typed classes ie. WordProcessingDocument, SpreadSheetDocument, PresentationDocument, while System.IO.Packaging doesn't.
Resources for System.IO.Packaging
- Word 2007 Content Control Toolkit, this is a handy tool written by Matt Scott for listing and adding content control to word if you want to bind them to custom Xml data source, it is provided with source code which also serves as a nontrivial sample of using System.IO.Packaging to customize Word.
- Manipulating Content in a WordProcessingML document, MSDN tutorial that uses System.IO.Packaging and LINQ to Xml to program word
Resources for DocumentFormat.OpenXml.Packaging
No comments:
Post a Comment