Excel web access web part
Is there any way to put the result of an Excel web access web part inside of a Tab of SP Forms? We have a form that uses tabs. Inside one of the tabs is a related item list that is a document library containing excel files. We are able to select one of these files and use the web part connection to send the document (excel file) URL to an Excel web access web part that is below the SP Form web part. However, this isn't very intuitive to users (they need to scroll down to see the Excel contents). It would be much better if the excel file displayed inside the tab.
- Dmitry Kozlov
- Site Admin
- Posts: 1524
- Joined: Thu Jun 07, 2012
You can replace the Excel web access web part with help of JavaScript. Please, open Forms Designer and put HTML-control into the form where you wish to display Excel web access. Place the following DIV-container into its Content property:
Now, open JS-editor of Forms Designer and put the following code there:
Please, note that I have highlighted the eq function. You should pass the order number of Excel Web access on the form page into this function.
Code: Select all
<div id="excelPlaceHolder"></div>
Code: Select all
$('div[id^="MSOZoneCell_WebPartWPQ"]').eq(2).detach().appendTo('#excelPlaceHolder');
Seems to work well, thanks! Editing the normal page behaves a little strange after doing this, but we can work around that.
Also, in this same scenario, when clicking on the Selection icon for any of the document library items, there is a postback and our tab focus is lost - so we have to re-navigate to the correct tab. The selected Excel file is displayed jus fine, but the viewstate is lost when selecting an item. Any clever fixes for that?
thanks
Also, in this same scenario, when clicking on the Selection icon for any of the document library items, there is a postback and our tab focus is lost - so we have to re-navigate to the correct tab. The selected Excel file is displayed jus fine, but the viewstate is lost when selecting an item. Any clever fixes for that?
thanks
-
- Information
-
Who is online
Users browsing this forum: No registered users and 13 guests