Open XML Opens Office Document Metadata (without Office)
Microsoft has been releasing a number of Open XML SDK v2 samples on the MSDN Code Gallery in the past few days, samples that interested me professionally, and so wanted to round the up for easy reference.
- Excel 2010: Generating Excel 2010 Workbooks using the Open XML SDK 2.0
- SharePoint 2010- Processing Documents in Bulk Using SharePoint 2010 and Open XML
- Office 2010: Retrieving Cell Values in Excel 2010 Workbooks
- Office 2010- Setting Custom Properties in Word 2010 Documents
- Office 2010- Adding Tables to Word 2010 Documents by Using the Open XML SDK 2.0
- Office 2010- Retrieving Lists of Hidden Rows or Columns in Excel
- Office 2010- Deleting Headers and Footers from Word Documents
- Office 2010- Converting Word 2010 Documents from the DOCM to DOCX File Format
- Office 2010- Retrieving Dictionaries of All Named Ranges in Excel 2010 Workbooks
- Office 2010- Changing the Print Orientation of Word 2010 Documents
- Use Open XML to manipulate images in Word (VBManipulateImagesInWordDocument)
- Use Open XML to manipulate images in Word (CSManipulateImagesInWordDocument)
- Retrieving the Number of Slides from PowerPoint 2010 by Using Open XML SDK 2.0
The key point is that these provide examples of doing things for the old/binary formats, required using Office COM, whereas now we can do it all without installing Office. Just another reason to love the more modern approach taken with the Open XML file format.
Here's an example of one of the above links;
Retrieving Comments from Word 2010 Documents by Using the Open XML SDK 2.0
"The sample provided with this article includes the code necessary to retrieve the XML block that contains all the comments from a Word 2007 (or later) document. The following sections walk you through the code, in explicit detail. When you use the sample code to retrieve the comments, the procedure returns an XML element, named w:comments, which contains the XML block of information from the original document. It's up to you (and your application) to interpret the results of retrieving the comments.
...
Related Past Post XRef:
Checking for Microsoft Word DocX/DocM Revisions/Track Changes without using Word... (via OpenXML SDK, LINQ to XML or XML DOM)
LINQ to XlsX... Using VB.Net, LINQ, the OpenXML SDK and a little C# helper, to query an Excel XlsX
Official boat-load, as in supertanker, sized OpenXML content list (Insert "One OpenXML content list to rule them all" here)
So how do I get from here to OpenXML? Got a map for you, an Open XML SDK Blog Map…
Where to go to scratch your OpenXML dev info itch…
"Open XML Explained" Free eBook (PDF)
Open XML SDK 2.0 for Microsoft Office Released – Automate Office documents without Office
Opening OpenXML, the Open XML Package Editor Power Tool for Visual Studio 2010
Open XML 2.0 Code Snippets for VS2010 (and VS2008 too)
Open XML Format SDK 2.0 Code Snippets for Visual Studio 2008 – 52 C#/VB Code Snippets to help ease your Open XML coding
Powering into OpenXML with PowerShell
Microsoft Office File Formats and Microsoft Office Protocols Documentation Refreshed
Microsoft Office File Formats and Protocols documentation updated for Office 2010 (Think “Now with added ‘X’ flavor… DocX, PptX, XlsX, etc”)
No comments:
Post a Comment