Erika Ehrli - Adventures with Office Products & Technologies
MSDN & TechNet: Releasing Office, SharePoint, Exchange & Lync Centers and content for developers and IT professionals.
 

June, 2008

  • Erika Ehrli - Adventures with Office Products & Technologies

    Announcing the Open XML Format SDK 1.0

    • 16 Comments

    We have great news for all Open XML developers who have waited so patiently for the fully supported release of the Open XML Format SDK 1.0. Today we published the final bits and online documentation on MSDN. You can get the SDK from the following locations:

    What is the Open XML Format SDK?

    I talked about this before in previous blog entries, but for those of you who are not familiar with this SDK, here's a brief intro.

    The Open XML Format SDK Technology Preview simplifies the task of manipulating Open XML packages. The Open XML Application Programming Interface (API) encapsulates many common tasks that developers perform on Open XML packages, so you can perform complex operations with just a few lines of code. Using this API, you can programmatically generate and manipulate Word 2007 documents, Excel 2007 spreadsheets, and PowerPoint 2007 presentations. The programming model uses managed code, so it's safe for server-side scenarios.

    The Open XML Format SDK also provides how-to articles and reference documentation that can help you get started with Open XML programming.

    What's New in the Open XML Format SDK 1.0

    The Open XML Format SDK 1.0 contains the changes described below:

    1. Renames the Microsoft.Office.DocumentFormat.OpenXml dll to DocumentFormat.OpenXml

    2. Renames the Microsoft.Office.DocumentFormat.OpenXml.Packaging namespace to DocumentFormat.OpenXml.Packaging

    3. Renames the Microsoft.Office.DocumentFormat.OpenXml namespace to DocumentFormat.OpenXml

    4. Adds support for validating by using the XmlSchemaSet object

    If you have written code using previous CTP releases, keep in mind that the first three are breaking changes. You need to delete the current reference to the Microsoft.Office.DocumentFormat.OpenXml.dll and replace it with DocumentFormat.OpenXml.dll. Also, you need to change the namespace references to DocumentFormat.OpenXml.Packaging and DocumentFormat.OpenXml.

    The last change has to do with a common ask from developers. Previous releases of the CTP allowed you to validate the contents of a part in an Open XML Package against a single schema file. However, it was not possible to validate against a collection of schemas. The Open XML Format SDK 1.0 provides an overloaded method of the ValidateXml method that allows you to validate a document part against a specific XmlSchemaSet object. The following sample code shows you how to validate the XML content of the MainDocumentPart part of a WordprocessingDocument package by calling the ValidateXml method of MainDocumentPart part. You pass a list of schemas to the ValidateXml method as an input parameter.

      

    ' Visual Basic
    ' How to validate the contents of a document part against
    ' a collection of schemas.
    Public Shared Sub ValidDocumentContent(document As String,
                                           schemaList
    As List (Of String))
      
    Dim schemas As New XmlSchemaSet()
      
    For Each schemaUri As String In schemaList
          schemas.Add(Nothing, schemaUri)
      
    Next schemaUri
       Using wordDoc
    As WordprocessingDocument =
                       
    WordprocessingDocument.Open(document, False)
          wordDoc.MainDocumentPart.ValidateXml(schemas, Nothing)
      
    End Using
    End Sub


    // C#
    // How to validate the contents of a document part against
    // a collection of schemas.
    public static void ValidDocumentContent(string document,
                                            List<
    string> schemaList) {
       XmlSchemaSet schemas 
    = new XmlSchemaSet();
       foreach 
    (string schemaUri in schemaList) {
          schemas.Add(
    null, schemaUri);
       
    }
       
    using (WordprocessingDocument wordDoc 
              
    WordprocessingDocument.Open(document, false)) {
          wordDoc.MainDocumentPart.ValidateXml(schemas, 
    null);
       
    }

    Some additional improvements...

    While looking at the class diagram, I noticed that the latest version includes support for a new MailMergeRecipientDataPart. You can find detailed info about this new part here. Some other minor object model changes are documented at the readme.htm file of the download.

    Finally, we significantly improved the comments/descriptions of all the members included in the class reference documentation and Intellisense file. It's easier to learn how to use an API when the comments and member descriptions are in good shape.

    Roadmap and Development Timeline

    The Open XML API Version 1.0 is included with the Open XML Format SDK 1.0 and only contains the Open XML Packaging API. Open XML API Version 2.0 releases should contain all of the Open XML API components, including the Open XML Packaging API with further updates. In the next months, the Open XML Format SDK product team will be releasing CTPs of the Open XML API Version 2.0.

    As I mentioned earlier, the latest version has some breaking changes, so the MSDN team is also planning to update the code and content of the Open XML Format SDK related articles such as:

  • Manipulate Excel 2007 and PowerPoint 2007 Files with the Open XML Object Model (Part 1 of 2)
  • Manipulate Excel 2007 and PowerPoint 2007 Files with the Open XML Object Model (Part 2 of 2)
  • Manipulate Word 2007 Files with the Open XML Object Model (Part 1 of 3)
  • Manipulate Word 2007 Files with the Open XML Object Model (Part 2 of 3)
  • Manipulate Word 2007 Files with the Open XML Object Model (Part 3 of 3)
  • Build Server-Side Document Generation Solutions Using the Open XML Object Model (Part 1 of 2)
  • Build Server-Side Document Generation Solutions Using the Open XML Object Model (Part 2 of 2)
  • Additional Resources

    I recommend that you continue to monitor the following blogs for more news about the Open XML Format SDK:

    More code samples: OpenXmlDeveloper.org site

    You can also watch Zeyad's and Eric's interview to learn more about the future of the Open XML Format SDK.

    Please continue to use the following two resources to ask questions to the product team and provide feedback :

    1. MSDN Forum: Open XML Format SDK: Use the forum to ask questions and provide suggestions. The product team is monitoring and moderating this forum.
    2. MSDN Library: Open XML Format SDK (Online version) Wiki: The online version of the SDK is Wiki enabled. This allows you to add comments and report bugs you find on documentation. To leave comments, use the "Add Community Content" link located at the bottom of each topic.

    Enjoy!

    Bookmark and Share
  • Erika Ehrli - Adventures with Office Products & Technologies

    Updated Office Developer Posters

    • 5 Comments

    Some other great news. We updated a couple Office developer posters.

    Developer Map for the 2007 Microsoft Office System

    This version includes new information related to:

    • PerformancePoint Server 2007
    • Visual Studio 2008 Application-Level Add-Ins and Document Level Customizations
    • Visual Studio 2008 Extensions for Windows SharePoint Services 3.0
    • Unified Communications products and technologies: Communicator 2007, Live Meeting, Exchange Server 2007, and Communications Server 2007
    • Interoperability
    • Visual Basic for Applications

    If you are currently attending Tech Ed, you can stop by at the following TLC Green OFC section booths to get a printed version of the poster:

    • MOSS Station
    • Office Developer/OBA Station
    • Office Development in Visual Studio
    • Unified Communications

    For those of you that are not attending Tech Ed, we will be publishing an online version soon. I'll update this blog entry as soon as I have the download url.

    Open XML Developer Map

    This version includes updated information related to:

    • Ecma Office Open XML Specifications
    • Online resources
    • Updates to WordprocessingML, SpreadsheetML, and PresentationML schema diagrams

    If you are currently attending Tech Ed, you can stop by at the TLC Green OFC - Open XML station to get a printed version of the poster. Doug Mahugh and Stephen Peront will be there!

    You can find the poster downloads here:

    http://download.microsoft.com/download/0/9/c/09cda3f2-6d3d-4082-aec5-9a62b7679ecf/2007OfficeDeveloperMap.pdf

    http://download.microsoft.com/download/e/2/0/e204963e-a4fc-4db3-9e84-27ef0fccd1b6/OpenXMLPoster.pdf

    Bookmark and Share
  • Erika Ehrli - Adventures with Office Products & Technologies

    New: SharePoint Essentials for .NET Developers

    • 1 Comments

    If you are a .NET developer curious about what is SharePoint and want to get started with SharePoint development, you should check out The SharePoint Developer Introduction for .NET Developers resource set announced today at Tech Ed. This is a new set of webcasts, virtual labs, screencasts, presentations, demos, white papers, hands on labs, and resources that show you how to build enterprise solutions using different SharePoint components such as:

    • Web Parts
    • Data Lists
    • Event Handlers
    • Workflow
    • Silverlight
    • Page Navigation
    • Page Branding
    • Web Services
    • Custom Content Types
    • User Management

    You should take a look at the The SharePoint Developer Introduction for .NET Developers Web site to find pointers to learning resources for all of the components listed previously. You should also check out Paul Andrew's blog post about the new set of SharePoint Developer Webcasts that provide introductory SharePoint developer topics for .NET developers.

    Also, if you want to learn more about the big picture, see a roadmap, and get an overview of SharePoint Products and Technologies, you should read Introduction to SharePoint Products and Technologies for the Professional .NET Developer. This  is an MSDN article that explores the extensible solution platform of SharePoint Products and Technologies and opportunities for its use in .NET development. It shows how developers experienced with the .NET Framework can take advantage of the built-in features and capabilities offered by SharePoint Products and Technologies to expand their existing knowledge, and build enterprise-scale Web-based solutions to reach the growing SharePoint audience.

    Paul and I wrote this article together hoping it could help you to learn more and get started with SharePoint development. We hope you enjoy this paper and all the different SharePoint for .NET developers learning resources announced today.

    Bookmark and Share
  • Page 1 of 1 (3 items)