360 likes | 591 Views
PR09. Document Assembly and Manipulation on Microsoft SharePoint Server 2010 Using Word Automation Services and Open XML. Zeyad Rajabi Program Manager Microsoft Corporation. Agenda. Manipulating Office files Open XML Formats Open XML SDK Office Services + Open XML SDK
E N D
PR09 Document Assembly and Manipulation on Microsoft SharePoint Server 2010 Using Word Automation Services and Open XML Zeyad Rajabi Program Manager Microsoft Corporation
Agenda • Manipulating Office files • Open XML Formats • Open XML SDK • Office Services + Open XML SDK • Word Automation Services • Excel Services • Lots! of demos • Resources + links • Q&A
Old school way Manipulating Office Files
Microsoft Confidential Old School WayAutomating Office Applications demo Zeyad Rajabi Program Manager Office
Key Takeaways • Application Object Model was not designed for bulk automation or server scenarios • Does not scale • Try running automation on 100s of documents • Dialog boxes “stop” automation • Customers reboot application on server every X hours
New school way Manipulating Office Files
What are they? Open XML Formats
Open XML Formats Architecture Developers see a zip file with xml parts Users see a single file File container MyDoc.docx Document properties • Default format in Office 2007 and 2010 • Word (.docx) • Excel (.xlsx) • PowerPoint (.pptx) • Open XML is an ISO standard • Document Parts • Most parts are XML Comments WordML/SpreadsheetML, etc. Custom-defined XML Images, video, sound Styles Charts
What it is and what it’s not? Open XML SDK
Open XML SDK Overview • Allows you to create and modify Open XML documents • SDK will support both Office 2007 SP2 and Office 2010 file formats • Based on .NET (C# and VB) • Compatible with LINQ • Provides a unified platform for solutions • Consistent client and server solutions • This SDK does NOT • Replace Office application Object Models • Perform layout + recalculation tasks • Perform file conversions to other formats, like PDF or XPS
Open XML SDK Road Map • Version 1.0 of the SDK • Provides part level manipulation • Final bits released June 2008 • “Go-Live” license – Free to use and build/deploy solutions • Version 2.0 of the SDK • Provides content level manipulation • 1st CTP released September 2008 • 2nd CTP released April 2009 • 3rd CTP released August 2009 • 4th CTP coming out soon • Final release around same time Office 2010 ships
Open XML SDK Architecture Open XML File Format Higher Level Schema Level Validation Semantic Level Validation Helper Functions Open XML File Format Base Level Reading/Writing Low Level DOM Packaging API System Support .Net 3.5 System.IO.Packaging Open XML Schemas
Microsoft Confidential Pushing Data into Open XMLMerging documents together demo Zeyad Rajabi Program Manager Office
Key Takeaways • Fast…very fast! • Easy to merge multiple Open XML documents together • Even different types of Open XML documents • Solution easily integrated in SharePoint • Document Set feature provides framework • Open XML SDK provides: • 1:1 mapping of parts/xml to API classes • Deal with objects instead of xml
Word and Excel Services Office Services
Extending Solutions with Services • SDK is super powerful at manipulating Office documents • There are still tasks that require application logic • Word: Pagination, layout, file format conversion • Excel: Calculation, rendering complex charts/pivot tables • Editing documents while open in the client • Office 2010 solves this by extending/adding to the services available on SharePoint
File conversions on the server Word Automation Services
What is Word Automation Services? • Brand new to Office 2010 (SharePoint) • 100% fidelity server-side rendering • Right down to the last pixel! • File | Save As on the server • Read/write any format understood by Word client • High volume throughput with scalability • Printing on server through PDF/XPS
Microsoft Confidential Introducing Word Automation Services demo Zeyad Rajabi Program Manager Office
Key Takeaways • Word Automation Services = server-ready version of Word • Fast! • 100% fidelity with client • Word Automation Services provides: • Layout • Export to fixed format • File conversion • Complex field calculation
Word Automation Services + Open XML SDK • The SDK and Word Automation Services are designed to be complimentary • SDK for file manipulation • Word for file conversion/archiving tasks • Deals with binary formats as well Open XML SDK Print Template Documents Data PDF Word Automation Services
Excel Services + Open XML SDK • Again, the SDK and Excel Services are complementary • Excel Services provides calculation and charting functionality • Excel Services in Office 2010 also includes REST API support • SDK provides manipulation and assembly functionality
Microsoft Confidential Integrating Word + Excel Services demo Zeyad Rajabi Program Manager Office
Key Takeaways • Office Services + Open XML SDK = Rich end to end soltutions • Each component serves a purpose • Open XML SDK is the glue that holds everything together
The possibilities… New File I/O SharePoint 2010
SDK + Co-Authoring • Not a traditional “service”, but the file pipeline used to enable multi-user authoring opens new solution possibilities • Solution these days span multiple users • We take care of many of the challenges in this space
Microsoft Confidential Integrating CoauthoringServer-side solution as a coauthoring client demo Zeyad Rajabi Program Manager Office
Key Takeaways • Documents open in the client application are no longer off limits to server code • Don’t have to rely on client solution • The document is the thing you program against at run time, not the application API
Demos... I Have More... • Come talk to me after this presentation • Find me at the Office booth • Bring a USB key to copy source code of demos • Or, download demos at Eric White’s or Zeyad Rajabi + Brian Jones’ blog
Links + Resources • Blogs • Eric White’s blog: http://blogs.msdn.com/ericwhite • Doug Mahugh’s blog: http://blogs.msdn.com/dmahugh • Zeyad Rajabi + Brian Jones’ blog: http://blogs.msdn.com/brian_jones • John Durant’s blog: http://blogs.msdn.com/johnrdurant • MSDN • Contains how-to articles and documentation • Forums related to SDK, code snippets download • http://msdn.microsoft.com/office/xml • Connect • Access to more articles and forums • Ability to log bugs and vote for features • http://connect.microsoft.com • Codeplex • Open source projects related to Open XML solutions (ex. PowerTools) • http://www.codeplex.com • Download site for the SDK: • Version 1.0: http://go.microsoft.com/fwlink/?LinkId=120908 • Version 2.0: http://go.microsoft.com/fwlink/?LinkId=127912
YOUR FEEDBACK IS IMPORTANT TO US! Please fill out session evaluation forms online at MicrosoftPDC.com
Learn More On Channel 9 • Expand your PDC experience through Channel 9 • Explore videos, hands-on labs, sample code and demos through the new Channel 9 training courses channel9.msdn.com/learn Built by Developers for Developers….