Thanks to author Aaron Meyers for permissions to reuse his original code.
SharePoint Content Database 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 ADOMD.NET SPClient XML/A Client MSOLAP SPClient Data Model Data Refresh Timer Job SSPM EWA PPivot App Database (WorkQ Table) Twitter Import DB XLTweet.xlsx Import Now Search Terms WorkItem DataImport TimerJob Twitter DataImport TimerJob Status List Twitter Data Import during Model Processing Search Terms List Tone Dictionary List SharePoint Work Item Queue Web Parts Power View
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 ADOMD.NET SPClient XML/A Client MSOLAP SPClient Data Model Data Refresh Timer Job SSPM EWA PPivot App Database (WorkQ Table) XLTweet.xlsx Power View
SharePoint Content Database 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 ADOMD.NET SPClient XML/A Client MSOLAP SPClient Data Model Data Refresh Timer Job SSPM EWA PPivot App Database (WorkQ Table) Twitter Import DB Xlviewer.aspx XLTweet.xlsx Import Now Search Terms WorkItem DataImport TimerJob Twitter DataImport TimerJob Status List Twitter Data Import during Model Processing Search Terms List Tone Dictionary List SharePoint Work Item Queue Web Parts Power View
Browser Interactivity and Web Parts Browser Interactivity and Web Parts Workbooks as a Data Source Office Apps Data Feed Support (List Import) 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 ADOMD.NET SPClient XML/A Client MSOLAP SPClient Data Model Data Refresh Timer Job SSPM EWA XLTweet.xlsx Power View
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 Services PowerPivot Data Refresh Timer Job User Interface (Manage Data Refresh page) SharePoint Timer Service Secure Store Service (Refresh Credentials) Twitter
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);
MySPC