DevProConnections Article: Taking Advantage of LINQ and XML in Microsoft Office 2007

Published 17 August 09 10:05 AM

This month I have an article on DevProConnections:

Taking Advantage of LINQ and XML in Microsoft Office 2007

In this article, I talk about how a lot of applications that need to take advantage of Microsoft Office can do so without going through COM. Many programs that need to process documents often require manipulation of the file formats directly and doing that through the Office component object model won’t scale very well. It also requires that Microsoft Office be installed to run. A better route in a lot of these cases is to use the Open XML SDK. With the release of Office 2007, Word documents, Excel spreadsheets and PowerPoint presentations are based on an open standard for packaging XML files called Open XML. Using Visual Basic’s powerful and simple implementation of LINQ to XML you can work with these new document formats much easier than ever before.

I show a couple practical examples of reading data from Word documents and updating a database as well as reading data from a database to create Word documents – all without COM. No Office applications need to be installed in order to read and write to these formats directly. 

This article is based on the two episodes I did on DnrTV:

[UPDATE: Here's code samples (also includes a presentation pptx)]

More resources:

  • Open XML Format SDK 2.0
  • Open XML Resource Center
  • Microsoft Visual Studio Tools for the Office System Power Tools v1.0.0.0
  • Word 2007 Content Control Toolkit
  • VSTO Developer Center
  • Visual Basic Developer Center

    Enjoy!

  • Comment Notification

    If you would like to receive an email when updates are made to this post, please register here

    Subscribe to this post's comments using RSS

    Comments

    No Comments

    Leave a Comment

    (required) 
    (optional)
    (required) 

      
    Enter Code Here: Required

    About Beth Massi

    Beth is a Program Manager on the Visual Studio Community Team at Microsoft and is responsible for producing and managing content for business application developers, driving community features and team participation onto MSDN Developer Centers (http://msdn.com), and helping make Visual Studio one of the best developer tools in the world. She also produces regular content on her blog (http://blogs.msdn.com/bethmassi), Channel 9, and a variety of other developer sites and magazines. As a community champion and a long-time member of the Microsoft developer community she also helps with the San Francisco East Bay .NET user group and is a frequent speaker at various software development events. Before Microsoft, she was a Senior Architect at a health care software product company and a Microsoft Solutions Architect MVP. Over the last decade she has worked on distributed applications and frameworks, web and Windows-based applications using Microsoft development tools in a variety of businesses. She loves teaching, hiking, mountain biking, and driving really fast.

    This Blog

    Syndication

    Page view tracker