Automatically Populating a filter or setting a slicer within an Excel Webpart

I'm currently working with a client on some excel services reports and they are requesting to display the reports specific to a project in an Excel Web Part.  What I have is the following:

  • An excel report that gathers all information on all projects within Project Server and displays a graph
  • The report contains a slicer on project name
  • The report has been imbedded into an Excel Webpart for display on the Project Site and is working correctly when that project name is selected

The last piece of this is to somehow have the Excel Webpart grab the Project Name from the SharePoint site and make it available to the excel report in order to preselect the slicer for that project name. 

Regardless of the connect to project if someone has been able to use an Excel Webpart to get data from SharePoint in order to set a slicer or filter can you direct me on how you did this?

Thanks for your help


May 19th, 2015 8:30am

Hi Donald,

According to your description, there is an Excel Web Access Web Part displays an Excel report in your site, you want to update the slice in this Excel report with the data retrieve from SharePoint.

Excel Web Service is a good option to manipulate Excel files which is saved in SharePoint library, however, there is no such method in the exposed APIs in Excel Services can meet this requirement:

As a workaround, I suggest you write code in the server side to download the Excel report to local drive, update it using Office API. For about getting project names from SharePoint, SharePoint Object Model would be a good choice. Then upload and override the original version in a SharePoint library, you will be able to see a new version of Excel report in the Excel Web Access Web Part.

About how to access SharePoint using SharePoint Object Model, the links below would be helpful:

Add, Update and Delete List Items Programmatically in SharePoint 

More information about SharePoint Object Model:

About Programming with Slicers in Excel 2010:

If there would be more questions about how to work with slicer in Excel using Office API, I suggest you post it to the corresponding forum, you will get more help and confirmed answers there.

The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us.


Patrick Liang
Free Windows Admin Tool Kit Click here and download it now
May 19th, 2015 10:14pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics