Share via


Office 2010 Service Applications Lab

Version: 3.0.0

Description

Now with both C# and VB code samples! In this lab, you will use the Office 2010 services applications to build a report generation application. This application uses Excel Services to access an Excel workbook via REST services and generate a Word document based on the data. Word Services converts the Word document into a PDF and XPS file and stores it in a report repository. Finally, Visio Services presents a graphical representation of the process to the user showing which reports have been generated.

Overview

In this lab exercise, use the Office 2010 services applications to build a report generation application. This application uses Excel Services to access an Excel workbook via REST services and generate a Word document based on the data. Word Services converts the Word document into a PDF and XPS file and stores it in a report repository. Finally, Visio Services presents a graphical representation of the process to the user showing which reports have been generated.

Objectives

In this lab you will:

  • Use Word Services to generate PDF and XPS files based on a Word document
  • Use Excel Service’s REST interface to access information in an Excel workbook

System Requirements

This lab assumes that you have SharePoint Server installed in a test environment. For guidance on how to setup SharePoint Server see https://msdn.microsoft.com/en-us/library/ee554869(office.14).aspx. Note that any URL referred to in this lab must be adjusted for use with your local setup. You must have the following items to complete this lab:

  • Microsoft® Windows® Vista SP1 or Microsoft® Windows Server 2008 (64-bit)
  • Microsoft® SharePoint Server 2010 (64-bit)
  • Microsoft® Office Professional Plus 2010 (32-bit or 64-bit)
  • Microsoft® Visual Studio 2010

Setup

You must perform the following steps to prepare your computer for this lab. This consists primarily of creating a SharePoint site collection at https://intranet.contoso.com/sites/OfficeServiceApplications and installing the code snippets for this lab.

  1. Run the command file Setup.bat located at %Office2010DeveloperTrainingKitPath%\Labs\OfficeServiceApplications\Source\.

Exercises

This Hands-On Lab is comprised of two exercises:

  1. Create reports using Excel Services
  2. Generating documents using Word Services

Estimated time to complete this lab: 60 minutes.

Starting Materials

This Hands-On Lab includes the following starting materials.

  • Visual Studio solutions. The lab provides the following Visual Studio solutions that you can use as starting point for the exercises. Lab instructions will reference the Training Kit location after installation as %Office2010DeveloperTrainingKitPath%.
    • %Office2010DeveloperTrainingKitPath%\Labs\OfficeServiceApplications\Source\[language]\Starter\StateReportApplication\StateReportApplication.sln: Uses Word Services and Excel Services to generate XPS and PDF documents based on data stored in an Excel workbook.
    Note:
    Inside the lab’s Source folder, you will find a Solution folder containing an end solution with the completed lab exercise.