Thanks to author Aaron Meyers for permissions to reuse his original code.

Post on 26-Dec-2015

214 views 0 download

Tags:

Transcript of Thanks to author Aaron Meyers for permissions to reuse his original code.

Deep Dive on PowerPivot in Office and SharePoint

Diego Oppenheimer & Kay Unkroth

SPC075

Goal

Deep dive into Excel Services and PowerPivot for SharePoint 2013 based on a sample Twitter application that analyzes Tweets according to customizable search terms.

Demo

XLTweet

Thanks to author Aaron Meyers for permissions to reuse his original code.

Our starting point…

SharePoint Content Database

Solution Architecture Overview

RS add-in

PPS Web Service

PowerPivot Web Service

Browser

Excel client

Excel Calculation

Services (ECS)

PPS Service App

RS Service App

PowerPivot System Service

Client Front-End Service Apps Analysis

Services

AD

OM

D.N

ET

SPC

lien

t

SPClient

XML/A Client

MSOLAP

SPClient

Data Model

Data Refresh

Timer Job

SSPM

EWA

PPivot App Database

(WorkQ Table)

TwitterImport DB

Xlviewer.aspx

XLTweet.xlsx

Office Apps

Import Now

SearchTerms

WorkItemDataImport

TimerJob

Twitter

DataImportTimerJob

Status List

Twitter Data Import during Model

ProcessingSearch

Terms List

Tone Dictionary

List

SharePoint Work Item

Queue

Web Parts

Import Now

Refresh Now

Refresh Direct

Refresh Interactive

Power View

What we needed to get started

RS add-in

PowerPivot Web Service

Browser

Excel client

Excel Calculation

Services (ECS)

RS Service App

PowerPivot System Service

Client Front-End Service Apps Analysis

Services

AD

OM

D.N

ET S

PC

lien

t

SPClient

XML/A Client

MSOLAP

SPClient

Data Model

Data Refresh

Timer Job

SSPM

EWA

PPivot App Database

(WorkQ Table)

Xlviewer.aspx

XLTweet.xlsx Refresh Interactive

Office 2013 ProPlusSharePoint 2013 EnterpriseSQL Server Analysis Services SP1 in SharePoint modeSQL Server 2012 DBMSVisual Studio 2012 with SharePoint 2013 Project Types

Power View

Our demo lab in Windows Azure

SharePoint Content Database

What we built

RS add-in

PowerPivot Web Service

Browser

Excel client

Excel Calculation

Services (ECS)

RS Service App

PowerPivot System Service

Client Front-End Service Apps Analysis

Services

AD

OM

D.N

ET

SPC

lien

t

SPClient

XML/A Client

MSOLAP

SPClient

Data Model

Data Refresh

Timer Job

SSPM

EWA

PPivot App Database

(WorkQ Table)

TwitterImport DB

Xlviewer.aspx

XLTweet.xlsx

Office Apps

Import Now

SearchTerms

WorkItemDataImport

TimerJob

Twitter

DataImportTimerJob

Status List

Twitter Data Import during Model

ProcessingSearch

Terms List

Tone Dictionary

List

SharePoint Work Item

Queue

Web Parts

Import Now

Refresh Now

Refresh Direct

Refresh Interactive

Power View

What key features our solution uses

Browser Interactivityand Web Parts

Workbooks as a Data Source

Timer Jobs and Scheduled Data

RefreshPower Pivot

Office Apps

Data Feed Support(List Import)

Workbooks as a Data Source

RS add-in

PowerPivot Web Service

Browser

Excel client

Excel Calculation

Services (ECS)

RS Service App

PowerPivot System Service

Client Front-End Service Apps Analysis

Services

AD

OM

D.N

ET S

PC

lien

t

SPClient

XML/A Client

MSOLAP

SPClient

Data Model

Data Refresh

Timer Job

SSPM

EWAXlviewer.aspx

XLTweet.xlsx Refresh Interactive

Power View

Demo

Accessing a Workbook as a Data Source

Scheduled Data Refresh

Analysis Services Engine

PowerPivot App Database (Work

Queue and Refresh History)

SharePoint Content

Database

SharePoint Configuration

Database

XLSX

RDBMS Server

PowerPivot System Service

Excel Calculation

ServicesPowerPivot Data Refresh Timer Job

User Interface(Manage Data Refresh page)

SharePoint Timer Service

Secure Store Service (Refresh Credentials)

Twitter

Demo

Running Scheduled Data Refresh on Demand

Excel Services SOAP API for Refresh

HttpContext.Current = null; LogStatus(currentSite, "Performing PowerPivot Workbook Refresh", "Refresh Direct");  Status[] status; ExcelService ecs = new ExcelService(this.workbookPath); string sessionId = ecs.OpenWorkbookEx(this.workbookPath, "en-US", "en-US", true, out status); CheckExcelServicesReturnValue(status);  WorkbookModelInfo modelInfo = ecs.EnsureWorkbookModel(sessionId, out status); CheckExcelServicesReturnValue(status);  if (modelInfo.Version == 15) { string[] workbookConnections = ecs.GetWorkbookConnections(sessionId, out status); CheckExcelServicesReturnValue(status);  if (workbookConnections != null && workbookConnections.Length > 0) { ecs.RefreshEx(sessionId, workbookConnections[workbookConnections.Length - 1], null, out status); CheckExcelServicesReturnValue(status);  ecs.SaveWorkbook(sessionId, out status); CheckExcelServicesReturnValue(status);  } }   ecs.CloseWorkbook(sessionId, out status); CheckExcelServicesReturnValue(status);

Building the workbook

Demo

Tweets have:Authors | Mentions

TimestampsHashTags

Type (Tweet | ReTweet)

Tone Dictionary allows to

calculate a tone score

Time table allows us to show

friendly time strings

• A mention can also be an author

• Hashtags are shared

List Office App<?xml version="1.0" encoding="utf-8"?><OfficeApp xmlns="http://schemas.microsoft.com/office/appforoffice/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ContentApp"> <Id>ab2bcc59-5cd3-4fbf-9fda-666ed674fa51</Id> <Version>1.0.0.1</Version> <ProviderName>Microsoft</ProviderName> <DefaultLocale>en-US</DefaultLocale> <DisplayName DefaultValue="Twitter App"> </DisplayName> <Description DefaultValue="Twitter App Panel"> </Description> <IconUrl DefaultValue="http://jonlaumain-t1/cc/AgaveIcons.png"> </IconUrl> <Capabilities> <Capability Name="Workbook"></Capability> </Capabilities> <DefaultSettings> <SourceLocation DefaultValue="http://sp2013demo/SitePages/SearchEmbeddedApp.aspx"> </SourceLocation> <RequestedWidth>400</RequestedWidth> <RequestedHeight>400</RequestedHeight> </DefaultSettings> <Permissions>ReadWriteDocument</Permissions> <AllowSnapshot>true</AllowSnapshot></OfficeApp>

Questions and Answers

diego@Microsoft.comkayu@Microsoft.com

Evaluate this session now on MySPC using your laptop or mobile device: http://myspc.sharepointconference.com

MySPC

© 2012 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.