An Excel Web Add-In can set to be automatically start when opening a template file.
Does this work in any environment?
The AutoStart feature is available under the folllowing preconditions:
- "Newer" Excel Version:
Excel for Windows Desktop. Build 16.0.8121.1000+
Excel for Mac. Build 15.34.17051500+
Excel Online - The Web Add-In must already be installed on the Excel Client or the AutoInstall Feature must be activated ("Visibility=1)
Either via the store or via the organizational account ... so, the AutoStart feature does not install the Add-In - The Web Add-In must contain the so-called "Office.AutoShowTaskpaneWithDocument" function
Of course we have implemented in the data1.io Excel Web Add-In.
How to activate the AutoStart feature of the data1.io Web Add-In in a template file
There are some basic rules to "stick" a Web Add-In to an Excel file:
- "Sticking" the Add-In to a Excel file
= open the Web Add-In and save the file -> that`s all!
What happens behind the scenes? You`ll find the file webextension1.xml in the folder xl -> webextensions of the XLSX-File:
Sticking the Add-In creates a link to the Add-In in the Office Store with reference to the version and the language of the Add-In:
Please note: this code was generated by sticking the Add-In from the Store on a client with OS language "german" and an active language pack in Office "english". - Removing the Add-In from an Excel file
= removing the Add-in is not that easy, closing the Pane of the Web Add-In and save the file does not change anything, the Add-In is still "sticked" in the background. A Taskpane Add-In can only be removed with the Command File -> Check for Issues -> Inspect Document: - Please note that a new (version) of the Add-In can only be sticked after removing the existing one.
Addtionally, we recommend to apply the following best practices:
- Best Practice #1: Remove the reference to a certain Add-In version
Remove the reference for the version of the Add-In from the webextension1.xml. To do this, rename the template file from "*.xlsx" to "*.zip". Then navigate to the file "webexension1.xml" and create a copy somewhere outside of the zip-file. Then make the changes (e.g. with a simple text editor) and copy the modified file back into the zip-file and replace the existing webextension1.xml:
Otherwise, what would happen?
If the Add-In version is stored with the template file then the users of the template file are asked every time when opening the file to press the Update Now Button, if the Add-In (more precisely: the manifest) was updated in the Office Store and the template file still references to an older version: - Best Practice #2: Do not remove the reference to the Store Language
If the reference to the Store Language is removed from the webextension1.xml, then the AutoInstall ("Visibility=1") Function will lead to a crash of Excel when pressing the "Trust this Add-In" Button. - Best Practice #3: If you have an "Organizational Account", use the Web Add-In provided via the Organizational Account (instead of the Add-In from the Office Store)
Sticking the "Store-Add-In" creates a link only to the Store-Add-In whereas sticking an "Organizational-Add-In" creates a link to both the Organizational- as well as the Store-Add-In. Therefore all users can use the AutoStart-feature independently from the Add-In installation method:
Otherwise, what would happen?
The AutoStart feature would not work for users who only have installed the Organizational Add-In.
Troubleshooting
- If the Add-In starts automatically please do not press the "Show Taskbar" Button of the data1.io Web Add-In since this will start a second instance of the Add-In ... we think this is a bug that will hopefully be solved soon by Microsoft:
- If the Add-In does not automatically start after opening the template file, this happens because the Add-In itself is not available (although it should). Th most common reason is the usage of different language packs on the Excel client of a user.
This happens in both deployment methods (My Add-Ins via the Office Store as well as Admin Managed via the Office 365 Administrator) since the installation of Excel Web Add-Ins are done (unfortunately) language specific. We hope that Microsoft will provide a solution in the near future.
Ressources
https://dev.office.com/docs/add-ins/design/automatically-open-a-task-pane-with-a-document