Page 1 of 1
Excel web access web part
Posted: 23 Feb 2014
by holtonba
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.
Re: Excel web access web part
Posted: 24 Feb 2014
by Dmitry Kozlov
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:
Code: Select all
$('div[id^="MSOZoneCell_WebPartWPQ"]').eq(2).detach().appendTo('#excelPlaceHolder');
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.
Re: Excel web access web part
Posted: 25 Feb 2014
by holtonba
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