What is the best way to implement a web interface into the application level custom task pane using Visual Studio 2015 for Excel 2010 and 2013 and set taskpane visibility from a ribbon button?
- I want to show/hide the custom task pane based on a ribbon button press.
- The web interface will have search and return results from a database.
- The web page will contain buttons, such that when pressed will place data into the Excel application.
Some thinking:
- Create a separate 'Task Pane Office AddIn' which creates the task pane using JavaScript and HTML.
Subsequently, show/hide this task pane using a separate VSTO Excel Ribbon AddIn button?
- But I don't know how to reference the Office AddIn task pane from the ribbon AddIn in this construct? (Its not clear this is the same question: How to show an Office/Word 2013 Task Pane 'Office App' after a click on a button in Ribbon?) which oddly says you can't.
- Inside the VSTO ribbon AddIn, embed a web interface control into the custom task pane (form or WPF) control? But (1) appears to be a much more robust solution? But I need the show task pane button working.
- Utilise the Microsoft JavaScript API in some way?
- Another method?
What I have done: I was able syncronise a VSTO Ribbon Excel Addin button to a custom taskpane that becomes visible and hidden that works in 2010 and 2013.
Using: https://msdn.microsoft.com/en-us/library/bb608590.aspx and CustomTaskPane in Excel doesn't appear in new Workbooks.
I also created a 'Task pane Office AddIn' in Excel using Visual Studio 2015.
Now, I would like to either synchronise a ribbon button to (1) or create a web interface using (2). Or be told/discuss the 'best way'?