Using LINQ to XML to process Open XML: The SpreadsheetML Class

This post describes the SpreadsheetML class (derives from the OpenXmlDocument class), which presents one approach for using LINQ to XML with Open XML spreadsheets. This blog is inactive.New blog: EricWhite.com/blog Blog TOCFeatures of this version of the LtxOpenXml namespace: The SpreadsheetML class contains three nested classes, Sheet, Row, and Cell, which represent some convenient abstractions…


Example that uses the OpenXmlDocument, WordprocessingML, and SpreadsheetML Classes (Dec 19, 2007)

This page presents simple uses of the OpenXmlDocument, WordprocessingML, and SpreadsheetML classes. This blog is inactive.New blog: EricWhite.com/blog Blog TOC using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Xml.Linq;using Microsoft.Examples.LtxOpenXml; class Program{    public static void WriteParagraphs(string filename)    {        Console.WriteLine(“Printing Paragraphs”);        Console.WriteLine(“===================”);        Console.WriteLine();        using (WordprocessingML doc = new WordprocessingML(filename))        {            foreach (var p in doc.Paragraphs())            {                Console.WriteLine(“Style: {0}   Text: >{1}<“,                   …


The OpenXmlDocument, WordprocessingML, and SpreadsheetML Classes (Dec 19, 2007)

This page presents a new version of the OpenXmlDocument, WordprocessingML, and SpreadsheetML classes. This blog is inactive.New blog: EricWhite.com/blog Blog TOC using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Xml;using System.Xml.Linq;using System.IO;using System.IO.Packaging; namespace Microsoft.Examples.LtxOpenXml{    class Relationship    {        public string Id { get; set; }        public string RelationshipType { get; set; }        public string ContentType { get; set; }       …


The WordprocessingML Class: A refinement of the approach of using LINQ to XML to access Open XML

(July 10, 2008 – I’ve written a new blog post on a better way to accomplish this.)  This blog is inactive.New blog: EricWhite.com/blog Blog TOCThis post presents a refinement of the OpenXmlDocument class, which is a new class (WordprocessingML) that derives from the OpenXmlDocument class. The WordprocessingML class adds additional functionality that is specific to WordprocessingML documents, including:…


The WordprocessingML Class

This page presents a refinement of the OpenXmlDocument class, which is a new class (WordprocessingML) that derives from the OpenXmlDocument class. The WordprocessingML class adds additional functionality that is specific to WordprocessingML documents, including: ·         This blog is inactive.New blog: EricWhite.com/blog Blog TOCSome constant strings that contain the DocumentRelationshipType, the StylesRelationshipType, and the CommentsRelationshipType.  …


OpenXML Content Types as an XML Document

(The line breaking is a bit funny, but it will copy and paste correctly to a text editor.) This blog is inactive.New blog: EricWhite.com/blog Blog TOC  If the RootNamespace element has text content, then the ContentType is for parts that contain XML. <?xml version=”1.0″ encoding=”utf-8″?><Root>  <Part>    <ContentType>Any content, support for which is application-defined.</ContentType>    <RootNamespace/>    <SourceRelationship>http://schemas.openxmlformats.org/officeDocument/2006/relationships/aFChunk</SourceRelationship>  </Part>  <Part>    <ContentType>application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml</ContentType>   …


OpenXML Content Types in an XML Document

While putting together the examples that use LINQ to XML to query Open XML documents, I needed to have a finite list of the XML content types. To determine whether a particular part contains XML, the correct approach is to see if the ContentType for the part is one of a specific list of content…


New Job as a Technical Evangelist for Open XML

I have news! I am leaving my current job documenting XML technologies (primarily LINQ to XML), and taking on the role of Open XML Technical Evangelist in DPE. I am very excited about the new job and the upcoming challenges. Open XML is an extremely important and visible initiative to Microsoft and the entire world,…


Using LINQ to XML with OpenXML Documents

(November 14, 2008 – I’ve updated my approach for querying Open XML documents using LINQ to XML.  You can see my new approach here: Open XML SDK and LINQ to XML. ) This blog is inactive.New blog: EricWhite.com/blog Blog TOC Given my focus on LINQ to XML over the last couple of years, I have to say that LINQ…