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

21

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

Page 1: Thanks to author Aaron Meyers for permissions to reuse his original code.
Page 2: 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

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

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.

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

Demo

XLTweet

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

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

Our starting point…

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

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

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

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

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

Our demo lab in Windows Azure

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

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

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

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)

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

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

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

Demo

Accessing a Workbook as a Data Source

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

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

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

Demo

Running Scheduled Data Refresh on Demand

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

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);

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

Building the workbook

Demo

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

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

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

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>

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

Questions and Answers

[email protected]@Microsoft.com

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

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

MySPC

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

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