Microsoft Office System UK Developers Conference Radisson Edwardian, Heathrow 29 th & 30 th June 2005
Programming Word and Excel XML Solutions Jed Farr & Jim Hanmer Microsoft Consulting Services
Agenda Role of XML in Office Word and Excel XML file formats Embed and manipulate custom XML Object model & server-side generation Tools
Evolution of File Formats Office 2000 Early Innovation XML document properties Office 97 Existing binary file formats designed in 1994, launched in Office 97 Office XP First XML Format Spreadsheet XML Office 2003 Breakthrough XML Support WordML, SpreadsheetML Custom-defined schema Office 12 New XML Formats XML file format default XML PowerPoint format Wave 12
The Role of XML in Office Capture and reuse of information Connecting users to data Intelligent applications
The Role of XML Documents and Spreadsheets Document assembly Content interrogation Document sanitisation
3/24/2004 XML Conference (Europe) Role of XML on the Desktop Health Agency % … Custom-defined Schemas Data-oriented (e.g., Price, Invoice) Represents the business information stored in the document Enable System Integration XML Reference Schemas Display-oriented (e.g. Bold, Italics, Tables, Paragraphs, Styles) Open Document Format Enable Archival & File Formats Interoperability John Doe Health Agency The Role of XML Reference and custom-defined schemas Custom-defined Schemas Data-oriented (e.g., Price, Invoice) Represents the business information stored in the document Enable System Integration XML Reference Schemas Display-oriented (e.g. Bold, Italics, Tables, Paragraphs, Styles) Open Document Format Enable Archival & File Formats Interoperability
Structure WordML and SpreadsheetML Save documents and workbooks as XML Publicly available XML 1.0 schemas WordML is lossless (all features supported) Simple hierarchy
Saving Documents and Workbooks as XML
Content Using your own XML in Word and Excel Support for W3C XML Schema 1.0 User-defined schemas Schema is attached to doc/workbook Support multiple schemas Provides validation on import/export
Content Excel XML Maps A mapping or translation of schema into a workbook Instance defined by schema A workbook can have several maps Integration with Excel lists Schema inference
Content Word Custom XML Structured data can be added to a Word document Easier to find data when parsing WordML Easier to build solutions within Word
Excel Mapping & Schema Inference Opening Customer XML In Word
Manipulating XML in Code Object models support XML manipulation Target content not structure Use familiar techniques (e.g. XPath)
Object Models Excel Maps, schemas, namespaces Import and export data – including events Manipulate lists Word Schemas, namespaces, nodes, transforms Richer event model
Document Processing and Generation Traditionally problematic Avoid running Word or Excel on server Create XML versions using standard XML libraries & XSLT
Bringing it all together
Tools Set of utilities to make working with Office XML easier Word XML toolbox (February 2003) XSLT Transform Generator Excel XML toolbox (May 2005) …on MSDN Office Developer Center
Office 12 New file formats Xml with compression New file extensions (docx, xlsx, pptx) Backward compatibility to 2000 Segmented storage 75% reduction in file size
Summary Structure vs. content WordML and SpreadsheetML Rich support for custom XML Extended object model Simple server-side generation Tools available Office 12 Questions?
© 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.