0
votes

We have a scenario where we'd like to display a custom URL in an Excel JS Task Pane via an add-in. Specifically, we want to look at a configurable path setting that we'll allow the user to configure and then browse to the appropriate server's page.

From what I've seen, Office locks down the Task Panes pretty decently, I'm not even able to navigate to another page within a task pane and have it re-use the task pane even if I use an anchor tag with a target="_top" or target="_self" attribute.

I'm looking for a way to use JavaScript to perform a ShowTaskPane action or have a variable URL defined in the manifest so depending on some value of a property the user has configured I can route to a dynamically generated URL in the task pane that will then give me user / organizational specific data to insert into the document.

Any ideas?

2
How about your backend providing only the data (e.g. in JSON format) and your add-in including a page rendering that data? - Dirk Vollmar
The problem with this is that we don't support OAuth2 and are looking to host an authentication page in the sidebar. I agree that your solution would be nice, but at the moment it's not viable. - Matt Eland
I think what's more tripping me up is that the options to customize the add-in's user interface - be it navigate to a custom URL or manipulate elements on the ribbon - seem to be pretty lacking and rigid. These things have caused us to halt our research spike into Excel JS add-ins and look at expanding existing VSTO add-ins instead. - Matt Eland

2 Answers

0
votes

If you'd like to navigate to a URL in the task pane, define an <AppDomain> element for the URL in the manifest. That should work. https://dev.office.com/docs/add-ins/overview/add-in-manifests#specify-domains-you-want-to-open-in-the-add-in-window

0
votes

If you cannot define the domain in the <AppDomain> of the app manifest, you can IFrame in the content you want. As long as it supports IFrame-ing


Upadte: After reading the comments on the question I see that you are trying to provide authentication. If the authentication comes from a single set of domains just add them to your manifest and all will be sweet. If the domain changes per auth request you are pretty much out of luck until wildcarded domains are added.