This post is about using the Excel Web Access Web Part to dynamically show a workbook.
The Problem
Many times, customers reach out to know more about Excel workbooks. Presently, SharePoint online offers a script editor or content editor to make users display Excel workbooks in an iframe. It is quite possible to write a jquery code within the script web part and dynamically set the excel workbook to iframe’s src. This comes with an issue that continuously displays the O365 Global Suite Navigation bar of the Excel web app. There was no way to hide that with the help of CSS or jquery while loading Excel web parts dynamically until the following solution came up.
The Solution
The solutions use Excel Web Access Web part and list view web part. These two web parts are connected So the list view web part sends the URL to view into the Excel Web Access Web part with a filter via the JSLink. The steps to follow are as follows:
- Create a Document Library and a View named MyExcelFileView. Add various fields including “Created By”
- Create a web part page (You can also use any existing Wiki page), edit it, and add 2 web parts.
- Upload javascript files to the SiteAssets library.
- Edit List view web part. Under Miscellaneous option, set JSLink;
- Set desired Appearance layouts and select what to display. The field “Created by” must be a part of the view
- All the workbooks of the logged-in user will be filtered.
- While the page is in Edit mode, you need to add Excel Web Access web part from Business Data
- Goto Connections> Get Workbook Url from -> A popup will load. Select Field Name “Document URL” and save the excel web part.
- Uncheck the box “Title Bar”
- Save Web part, page and publish
You can now see excel is already loaded in the excel web part.
MachPanel Automation Platform for Microsoft CSP
MachPanel is an end-to-end business management platform that offers provisioning and management of M365 services. It supports CSPs with Microsoft Security requirements for the Secure Application Model for CSP Integration. With MachPanel, CSPs can offer SharePoint offerings, Exchange Online offerings, and Deliver the goods with smooth M365 provisioning. With MachPanel, you can bring more bangs for the buck and experience simplified licensing, simplified billing process. It is easier to showcase, bundle, and sell. It also offers complete control over subscription and plans.
Get Started with MachPanel and experience best-in-line provisioning and management along with lucrative CSP offerings and SharePoint automation for your business.