Keep add-in alive when user closes task pane
When the user closes the web add-in task pane, the web add-in is terminated for that workbook with no warning. I currently see at least four distinct issues:
- any in-progress operation may be interrupted with unpredictable results
- The add-in’s Excel event processing and handling is terminated. So, there is no longer any reaction to user gestures such as editing a cell or changing the selection
- The user steps needed to re-open the task pane (to re-attach the add-in really) are non-obvious for the average user
- If the user does discover how to re-insert the add-in, the add-in starts from scratch and runs all startup code as if the workbook had just been opened. So, the add-in cannot continue where it left off. In our use cases, this situation can result in user data loss
Our #1 ask here is to keep the add-in running when the user closes the task pane. Just hide it. The add-in should continue to receive Excel events and be able to execute add-in code. The button to display the add-in task pane should simply un-hide the add-in (and not re-load it from scratch).
Perhaps you can introduce the concept of an application-level web add-in (Office.js) as already exists in the VSTO architecture.
Barring this, please warn the user that closing the task pane terminates the add-in and all of its functionality.
Or, provide an event that we can use to warn the users and allow them to cancel.