<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Office Client Developer Content and Resources : &amp;quot;Open XML&amp;quot;</title><link>http://blogs.msdn.com/officedevdocs/archive/tags/_2600_quot_3B00_Open+XML_2600_quot_3B00_/default.aspx</link><description>Tags: &amp;quot;Open XML&amp;quot;</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Open XML SDK 2.0 CTP Available</title><link>http://blogs.msdn.com/officedevdocs/archive/2008/10/14/open-xml-sdk-2-0-ctp-available.aspx</link><pubDate>Wed, 15 Oct 2008 00:12:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9000063</guid><dc:creator>soliver</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/officedevdocs/comments/9000063.aspx</comments><wfw:commentRss>http://blogs.msdn.com/officedevdocs/commentrss.aspx?PostID=9000063</wfw:commentRss><wfw:comment>http://blogs.msdn.com/officedevdocs/rsscomments.aspx?PostID=9000063</wfw:comment><description>&lt;p&gt;The Open XML SDK 2.0 Community Technology Preview (CTP) is here!&lt;/p&gt;  &lt;p&gt;You can find the documentation for it &lt;a href="http://msdn.microsoft.com/en-us/library/bb448854(office.14).aspx" target="_blank"&gt;here&lt;/a&gt; and the SDK download &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=c6e744e5-36e9-45f5-8d8c-331df206e0d0&amp;amp;DisplayLang=en" target="_blank"&gt;here&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;Zeyad Rajabi, a Program Manager for the Open XML SDK, has begun a series of &lt;a href="http://blogs.msdn.com/brian_jones/archive/2008/10/06/open-xml-format-sdk-2-0.aspx" target="_blank"&gt;posts&lt;/a&gt; covering the Open XML SDK design goals and architecture, sprinkling in some sample code as he goes along.&lt;/p&gt;  &lt;p&gt;Also, Eric White, a Microsoft Technical Evangelist, has a great &lt;a href="http://blogs.msdn.com/ericwhite/archive/2008/09/06/announcing-the-first-ctp-of-open-xml-sdk-v2.aspx" target="_blank"&gt;write up&lt;/a&gt; on the new version of the SDK.&lt;/p&gt;  &lt;p&gt;This new version of the SDK is an amazing leap forward.The Open XML SDK &lt;a href="http://msdn.microsoft.com/en-us/library/bb448854.aspx" target="_blank"&gt;version 1&lt;/a&gt; greatly simplified working with &lt;em&gt;packages&lt;/em&gt;. Developers could manipulate Open XML file format compliant documents at the package and part levels using strongly typed .NET classes. To access the file formats at the element level, you still had to work directly with the underlying XML.&lt;/p&gt;  &lt;p&gt;In the Open XML SDK version 2, the development team has taken most of the elements in the various schemas for the Open XML file formats (WordprocessingML, SpreadsheetML, PresentationML, etc., etc.) and made first-class managed objects out of them. Not to mention the fact that they've &amp;quot;linq-ified&amp;quot; the entire API so you have the power of Linq, as well.&lt;/p&gt;  &lt;p&gt;This makes things much easier if, like me, working with XML directly isn’t your strong suit. With the Open XML SDK v2, I can work with objects that represent the XML elements instead of having to work in the underlying XML itself (although the SDK also supports LINQ to XML, as well). For instance, suppose I needed to locate the first table in a Word document. I could easily locate the first table present in the document with code like this:&lt;/p&gt;  &lt;div&gt;   &lt;div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;     &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; (WordprocessingDocument theDoc = WordprocessingDocument.Open(location, &lt;span style="color: #0000ff"&gt;true&lt;/span&gt;))&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   2:&lt;/span&gt; {&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 99.36%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; height: 16px; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   3:&lt;/span&gt;     MainDocumentPart mainPart = theDoc.MainDocumentPart;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   4:&lt;/span&gt;&amp;#160; &lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   5:&lt;/span&gt;     Table theTable = mainPart.Document.Descendants&amp;lt;Table&amp;gt;().First();&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;You can see the advantage of using this new version of the SDK in line 5 of the code snippet where, by specifying that I want to filter for descendants of the &lt;strong&gt;Document&lt;/strong&gt; object (which represents the &lt;font face="Courier New"&gt;&amp;lt;w:document&amp;gt;&lt;/font&gt; element in the Microsoft implementation of the Open XML WordprocessingML) where the descendant is of type &lt;strong&gt;Table&lt;/strong&gt; (that is, I want all &lt;font face="Courier New"&gt;&amp;lt;w:tbl&amp;gt;&lt;/font&gt; elements), I can immediately get to the tables in my Word document.&amp;#160; Then, by using the &lt;font face="Courier New"&gt;First()&lt;/font&gt; extension method, I can select the first table element in the returned list of descendant table elements. All without having to do the detailed work of traversing the underlying XML directly; the API handles the XML work for me.&lt;/p&gt;

&lt;p&gt;Or how about trying to get to the text in a specific cell in the Word 2007 table? I’m simplifying things a great deal, but let's assume I know which cell has the data I want (the cell in the 2nd row and 1st column): &lt;/p&gt;

&lt;div&gt;
  &lt;div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;
    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   1:&lt;/span&gt; TableRow theRow = theTable.Elements&amp;lt;TableRow&amp;gt;().ElementAt(1);&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   2:&lt;/span&gt;&amp;#160; &lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   3:&lt;/span&gt; TableCell theCell = theRow.Elements&amp;lt;TableCell&amp;gt;().ElementAt(0);&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   4:&lt;/span&gt;&amp;#160; &lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   5:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; cellText = theCell.InnerText;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   6:&lt;/span&gt;&amp;#160; &lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   7:&lt;/span&gt; Console.WriteLine(&lt;span style="color: #006080"&gt;&amp;quot;The 2nd row, 1st cell text is {0}&amp;quot;&lt;/span&gt;, cellText);&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;So here I just use the same technique that I used above to find elements of a given type (by using the provided generic methods) in order to find the 2nd row of the table (&lt;font face="Courier New"&gt;&amp;lt;TableRow&amp;gt;().ElementAt(1)&lt;/font&gt;) and the first cell &lt;font face="Courier New"&gt;(&amp;lt;TableCell&amp;gt;().ElementAt(0)&lt;/font&gt;). Then I just pull the value of the &lt;strong&gt;Cell&lt;/strong&gt; object's &lt;strong&gt;InnerText&lt;/strong&gt; property and it's done! Although there are other ways to use the SDK to get the same data, you can still see that with only a few lines of code, I'm able to do quite a bit without working directly in the underlying XML. And remember, we can do this type of manipulation WITHOUT running the client application (in this case Microsoft Word 2007).&lt;/p&gt;

&lt;p&gt;The Office Client Developer Content team (my team) has some great examples on the MSDN web site &lt;a href="http://msdn.microsoft.com/en-us/library/bb491088(office.14).aspx" target="_blank"&gt;here&lt;/a&gt;. Check it out! &lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9000063" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/officedevdocs/archive/tags/developer/default.aspx">developer</category><category domain="http://blogs.msdn.com/officedevdocs/archive/tags/Office/default.aspx">Office</category><category domain="http://blogs.msdn.com/officedevdocs/archive/tags/_2600_quot_3B00_Open+XML_2600_quot_3B00_/default.aspx">&amp;quot;Open XML&amp;quot;</category></item><item><title>Open XML SDK 1.0 Available</title><link>http://blogs.msdn.com/officedevdocs/archive/2008/06/10/open-xml-sdk-1-0-available.aspx</link><pubDate>Wed, 11 Jun 2008 01:26:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8590516</guid><dc:creator>dhale</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/officedevdocs/comments/8590516.aspx</comments><wfw:commentRss>http://blogs.msdn.com/officedevdocs/commentrss.aspx?PostID=8590516</wfw:commentRss><wfw:comment>http://blogs.msdn.com/officedevdocs/rsscomments.aspx?PostID=8590516</wfw:comment><description>&lt;P&gt;Just read fantastic news from Erika Ehrli Cabral that the Open XML SDK 1.0 is now available. She writes:&lt;/P&gt;
&lt;P&gt;"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. &lt;/P&gt;
&lt;P&gt;The Open XML Format SDK also provides how-to articles and reference documentation that can help you get started with Open XML programming."&lt;/P&gt;
&lt;P&gt;See &lt;A class="" href="http://blogs.msdn.com/erikaehrli/archive/2008/06/10/announcing-the-open-xml-format-sdk-1-0.aspx" mce_href="http://blogs.msdn.com/erikaehrli/archive/2008/06/10/announcing-the-open-xml-format-sdk-1-0.aspx"&gt;her post&lt;/A&gt; for details on where to download.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8590516" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/officedevdocs/archive/tags/developer/default.aspx">developer</category><category domain="http://blogs.msdn.com/officedevdocs/archive/tags/Office/default.aspx">Office</category><category domain="http://blogs.msdn.com/officedevdocs/archive/tags/documentation/default.aspx">documentation</category><category domain="http://blogs.msdn.com/officedevdocs/archive/tags/Excel/default.aspx">Excel</category><category domain="http://blogs.msdn.com/officedevdocs/archive/tags/_2600_quot_3B00_Open+XML_2600_quot_3B00_/default.aspx">&amp;quot;Open XML&amp;quot;</category><category domain="http://blogs.msdn.com/officedevdocs/archive/tags/PowerPoint/default.aspx">PowerPoint</category></item><item><title>Open XML Format SDK April CTP</title><link>http://blogs.msdn.com/officedevdocs/archive/2008/04/17/open-xml-format-sdk-april-ctp.aspx</link><pubDate>Fri, 18 Apr 2008 02:15:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8405124</guid><dc:creator>dhale</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/officedevdocs/comments/8405124.aspx</comments><wfw:commentRss>http://blogs.msdn.com/officedevdocs/commentrss.aspx?PostID=8405124</wfw:commentRss><wfw:comment>http://blogs.msdn.com/officedevdocs/rsscomments.aspx?PostID=8405124</wfw:comment><description>&lt;P&gt;Erika has a &lt;A class="" href="http://blogs.msdn.com/erikaehrli/archive/2008/04/17/announcing-the-open-xml-format-sdk-april-ctp.aspx" mce_href="http://blogs.msdn.com/erikaehrli/archive/2008/04/17/announcing-the-open-xml-format-sdk-april-ctp.aspx"&gt;detailed post&lt;/A&gt; on the new release of the Open XML Format&amp;nbsp;SDK, as well as the future of the SDK. The Client Dev Docs team is looking forward to creating the new components (Version 2.0, below)&amp;nbsp;of the SDK over the coming year.&lt;/P&gt;
&lt;P&gt;&lt;IMG title="Open XML SDK Roadmap" style="WIDTH: 653px; HEIGHT: 157px" height=157 alt="Open XML SDK Roadmap" src="http://msdn2.microsoft.com/en-us/library/Cc471945.005f8a8c-2464-4115-bc13-f0c07b1597e6(en-us,office.12).gif" width=653 mce_src="http://msdn2.microsoft.com/en-us/library/Cc471945.005f8a8c-2464-4115-bc13-f0c07b1597e6(en-us,office.12).gif"&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8405124" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/officedevdocs/archive/tags/Office+developer+documentation/default.aspx">Office developer documentation</category><category domain="http://blogs.msdn.com/officedevdocs/archive/tags/developer/default.aspx">developer</category><category domain="http://blogs.msdn.com/officedevdocs/archive/tags/Office/default.aspx">Office</category><category domain="http://blogs.msdn.com/officedevdocs/archive/tags/documentation/default.aspx">documentation</category><category domain="http://blogs.msdn.com/officedevdocs/archive/tags/_2600_quot_3B00_Open+XML_2600_quot_3B00_/default.aspx">&amp;quot;Open XML&amp;quot;</category></item></channel></rss>