old school way microsoft confidential new school way

38
SharePoint 2010 Based Document Assembly and Manipulation using Word Automation Services and Open XML Zeyad Rajabi Program Manager Microsoft Corporation

Upload: laurence-melvin-cross

Post on 24-Dec-2015

219 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Old school way Microsoft Confidential New school way

SharePoint 2010 Based Document Assembly and Manipulation using Word Automation Services and Open XML

Zeyad RajabiProgram ManagerMicrosoft Corporation

Page 2: Old school way Microsoft Confidential New school way

Agenda

Manipulating Office filesOpen XML FormatsOpen XML SDKOffice Services + Open XML SDK

Word Automation ServicesExcel Services

Lots! of demosResources + linksQ&A

Page 3: Old school way Microsoft Confidential New school way

MANIPULATING OFFICE FILES

Old school way

Page 4: Old school way Microsoft Confidential New school way

Old School WayAutomating Office Applications

Zeyad RajabiProgram ManagerOffice

Microsoft Confidential

demo

Page 5: Old school way Microsoft Confidential New school way

Key Takeaways

Application Object Model was not designed for bulk automation or server scenariosDoes not scale

Try running automation on 100s of documents

Dialog boxes “stop” automationCustomers reboot application on server every X hours

Page 6: Old school way Microsoft Confidential New school way

MANIPULATING OFFICE FILES

New school way

Page 7: Old school way Microsoft Confidential New school way

OPEN XML FORMATSWhat are they?

Page 8: Old school way Microsoft Confidential New school way

Open XML Formats Architecture

Users see a single file

MyDoc.docx

Developers see a zip file with xml parts

Document properties

File container

Comments

WordML/SpreadsheetML, etc.

Custom-defined XML

Images, video, sound

Styles

Charts

• 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

Page 9: Old school way Microsoft Confidential New school way

OPEN XML SDKWhat it is and what it’s not?

Page 10: Old school way Microsoft Confidential New school way

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 solutionsConsistent client and server solutions

This SDK does NOTReplace Office application Object ModelsPerform layout + recalculation tasksPerform file conversions to other formats, like PDF or XPS

Page 11: Old school way Microsoft Confidential New school way

Open XML SDK Road Map

Version 1.0 of the SDKProvides part level manipulationFinal bits released June 2008“Go-Live” license – Free to use and build/deploy solutions

Version 2.0 of the SDKProvides content level manipulation1st CTP released September 20082nd CTP released April 20093rd CTP released August 2009Final release around same time Office 2010 ships

Page 12: Old school way Microsoft Confidential New school way

Pushing Data into Open XMLMerging documents together

Zeyad RajabiProgram ManagerOffice

demo

Microsoft Confidential

Page 13: Old school way Microsoft Confidential New school way

Key Takeaways

Fast…very fast!Easy to merge multiple Open XML documents together

Even different types of Open XML documents

Solution easily integrated in SharePointDocument Set feature provides framework

Open XML SDK provides:1:1 mapping of parts/xml to API classes

Deal with objects instead of xml

Page 14: Old school way Microsoft Confidential New school way

OFFICE SERVICESWord and Excel Services

Page 15: Old school way Microsoft Confidential New school way

Extending Solutions with Services

SDK is super powerful at manipulating Office documentsThere are still tasks that require application logic

Word: Pagination, layout, file format conversionExcel: Calculation, rendering complex charts/pivot tablesEditing documents while open in the client

Office 2010 solves this by extending/adding to the services available on SharePoint

Page 16: Old school way Microsoft Confidential New school way

Word Automation Services

announcing

Page 17: Old school way Microsoft Confidential New school way

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 clientHigh volume throughput with scalability

Printing on server through PDF/XPS

Page 18: Old school way Microsoft Confidential New school way

0 1 2 3 4 5 6 7 8 9 10 11 120

10000

20000

30000

40000

50000

60000

70000

80000

90000

100000

Performance of Document Conversion (to PDF)

Word Automation ServicesWord 2007Competitor

Time (Hours)

# o

f D

ocum

ents

Convert

ed

FAST!

Word Automation Services PerformanceApplication Pages/second Docs/hr* Docs/day*

Word Automation Services

20-30 7,200 172,800

Word 2007 ~5-7 900 21,600

Competitor 0.333 120 2,880

Page 19: Old school way Microsoft Confidential New school way

Introducing Word Automation Services

Zeyad RajabiProgram ManagerOffice

demo

Microsoft Confidential

Page 20: Old school way Microsoft Confidential New school way

Key Takeaways

Word Automation Services = server-ready version of WordFast!100% fidelity with clientWord Automation Services provides:

LayoutExport to fixed formatFile conversionComplex field calculation

Page 21: Old school way Microsoft Confidential New school way

Word Automation Services + Open XML SDK

The SDK and Word Automation Services are designed to be complimentary

SDK for file manipulationWord for file conversion/archiving tasks

Open XML SDK

Data

Documents

Word Automation

Services

PDF Print

Template

Page 22: Old school way Microsoft Confidential New school way

Integrating Word Automation ServicesMassive “mail merge” to PDF

Zeyad RajabiProgram ManagerOffice

demo

Microsoft Confidential

Page 23: Old school way Microsoft Confidential New school way

Key Takeaways

SDK + Word Automation Services complementaryServer side Word document solutions without clientDealing with legacy binary (doc) formats…no problem

Use Word Services to convert to docxUse SDK to manipulate docx(Optional) Use Word Services to convert back to doc

Page 24: Old school way Microsoft Confidential New school way

Excel Services + Open XML SDK

Again, the SDK and Excel Services are complementaryExcel Services provides calculation and charting functionality

Excel Services in Office 2010 also includes REST API support

SDK provides manipulation and assembly functionality

Page 25: Old school way Microsoft Confidential New school way

Integrating Excel ServicesAllowing Excel Services to query Word documents

Zeyad RajabiProgram ManagerOffice

demo

Microsoft Confidential

Page 26: Old school way Microsoft Confidential New school way

Key Takeaways

Open XML SDK extends reach of Excel ServicesOffice files can be thought of as rich sources of data (similar to databases)

Page 27: Old school way Microsoft Confidential New school way

Integrating Word + Excel Services

Zeyad RajabiProgram ManagerOffice

demo

Microsoft Confidential

Page 28: Old school way Microsoft Confidential New school way

Key Takeaways

Office Services + Open XML SDK = Rich end to end soltutionsEach component serves a purposeOpen XML SDK is the glue that holds everything together

Page 29: Old school way Microsoft Confidential New school way

NEW FILE I/O SHAREPOINT 2010

The possibilities…

Page 30: Old school way Microsoft Confidential New school way

SDK + Co-Authoring

Not a traditional “service”, but the file pipeline used to enable multi-user authoring opens new solution possibilitiesSolution these days span multiple users

We take care of many of the challenges in this space

Page 31: Old school way Microsoft Confidential New school way

Integrating CoauthoringServer-side solution as a coauthoring client

Zeyad RajabiProgram ManagerOffice

demo

Microsoft Confidential

Page 32: Old school way Microsoft Confidential New school way

Key Takeaways

Documents open in the client application are no longer off limits to server code

Don’t have to rely on client solutionThe document is the thing you program against at run time, not the application API

Page 33: Old school way Microsoft Confidential New school way

What’s the Real “User” Value?

Allow them to stay within OfficeTake advantage of familiarity with Office

Save them time by automating tasks and reducing repetitive busy-workGive them what they need fasterReduce the need to context switch between applications or tasks

Page 34: Old school way Microsoft Confidential New school way

Demos... I Have More...

Come talk to me after this presentationFind me at the Office booth or Ask the Experts EventBring a USB key to copy source code of demosOr, download demos at Eric White’s or Zeyad Rajabi + Brian Jones’ blog

Check out my other SPC presentation:SPC402 - “Deep Dive Open XML and the Open XML SDK”@ 1:15pm today (10/20) @ Mandalay Bay Ballroom J

Page 35: Old school way Microsoft Confidential New school way

Links + ResourcesBlogs

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

MSDNContains how-to articles and documentationForums related to SDK, code snippets downloadhttp://msdn.microsoft.com/office/xml

ConnectAccess to more articles and forumsAbility to log bugs and vote for featureshttp://connect.microsoft.com

CodeplexOpen 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

Page 36: Old school way Microsoft Confidential New school way

Q&AAny questions? Want to share scenarios/solutions?

Page 37: Old school way Microsoft Confidential New school way

© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.

The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after

the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Page 38: Old school way Microsoft Confidential New school way