Browse by Tags

All Tags » OpenXML » LINQ to XML » Useful Code Snippets
  • Using LINQ to Query Excel Tables

    [Blog Map] Excel has a very cool feature where you can declare that a range of cells is a table.  It is a feature that allows you to use Excel very much like a database.  You can add new rows as necessary, sort the table by columns, do some simple filtering, calculate the sum of columns, and more.  Each table has a unique table ...
    Posted to LINQ in Action roller (Weblog) by Anonymous on November 14, 2008
  • Remove Rsid Attributes and Elements before Comparing Documents

    [Blog Map]  A convenient way to explore Open XML markup is to create a small document, modify the document slightly in the Word user interface, save it, and then compare it with the Open XML Diff utility that comes with the Open XML SDK V2.  However, Word adds extraneous elements and attributes that enable merging of two documents that ...
    Posted to LINQ in Action roller (Weblog) by Anonymous on November 3, 2008
  • Creating Data-Bound Content Controls using the Open XML SDK and LINQ to XML

    Data-bound content controls are a powerful and convenient way to separate the semantic business data from the markup of an Open XML document.  After binding content controls to custom XML, you can query the document for the business data by looking in the custom XML part rather than examining the markup.  Querying custom XML is much ...
    Posted to LINQ in Action roller (Weblog) by Anonymous on October 19, 2008
  • Using LINQ to XML to Retrieve Content Controls in Word 2007

    Content controls are an effective way to add structure to word processing documents.  You can write a very small LINQ query to retrieve the contents of content controls.  This topic in Office Online provides more information on content controls. In an upcoming post, I’m going to show how you can write a small test harness to test code ...
    Posted to LINQ in Action roller (Weblog) by Anonymous on August 21, 2008