OfficeDev / office-js

A repo and NPM package for Office.js, corresponding to a copy of what gets published to the official "evergreen" Office.js CDN, at https://appsforoffice.microsoft.com/lib/1/hosted/office.js.
https://learn.microsoft.com/javascript/api/overview
Other
670 stars 96 forks source link

Is the Auto Open Task Pane after installation feature available in Excel desktop? #3975

Closed HugoAlbertoNieto closed 8 months ago

HugoAlbertoNieto commented 8 months ago

Please, confirm whether the Auto Open Task Pane after installation feature is available in Excel desktop

I wanted to enhance the First Run Experience of my Excel addin by auto opening a task pane when the addin is first installed. My addin contains add-in commands, so the task pane will not open by default. I see there are two main articles in the documentation that are related to what I need:

https://learn.microsoft.com/en-us/office/dev/add-ins/develop/automatically-open-on-installation https://learn.microsoft.com/en-us/office/dev/add-ins/develop/automatically-open-a-task-pane-with-a-document

I will focus on the first one as I only need the task pane to open only when the addin is installed. The first document explains exactly what I need for my addin. It states that I should configure a default task pane as follows:

<Action xsi:type="ShowTaskpane">
    <TaskpaneId>Office.AutoShowTaskpaneWithDocument</TaskpaneId>
    <SourceLocation resid="Contoso.Taskpane.Url" />
</Action>

I did this and then I started testing in a local development environment using Excel desktop in a Windows machine. When I run npm start, an instance of Excel opens as usual and then the task pane automatically opens as well. So, everything is fine at this point.

However, when I sideload the addin using the manifest, the task pane will not open automatically. I went ahead and tested the same manifest in Excel online and Excel for Mac and in both cases the task pane opens automatically, so the issue seems to be present only in Excel desktop.

I know the first article also contains a note stating the following: image

But the fact that this works in a local development environment and it also works in Excel for Mac, makes me wonder.. So, is this feature still under development for Excel destop in Windows?

Thanks.

zhenhuangMSFT commented 8 months ago

@HugoAlbertoNieto Thanks for sharing your findings with us. The auto-launch feature is supported on web, desktop and mac now. Looks like the document needs some update. We are investigating on the inconsistency of auto-launch behavior with sideload.

yuc014 commented 8 months ago

Hi @HugoAlbertoNieto, There are many ways to sideload addins for different platforms. Currently, for sideload addin, we only support autolaunch "registered" type of addins. This is only supported by the latest version of MAC and Win32(not Semi-annual version).

  1. For WXP Online Sideload Office Add-ins to Office on the web - Office Add-ins | Microsoft Learn (Should NOT autolaunch)

  2. For WXP Desktop

  1. For WXP Mac Sideload Office Add-ins on Mac for testing - Office Add-ins | Microsoft Learn(Should autolaunch)

And as you said your sideload addin is working on Excel online and mac, can you give me your sideload steps for Excel online? And for Excel desktop, you can see there is one way can work. If it still cannot work, please provide me your excel version, and a live recording is better. Thanks.

HugoAlbertoNieto commented 8 months ago

Thanks @yuc014 @zhenhuangMSFT!

Here are my comments:

  1. For WXP Online (Should NOT autolaunch): Here are the steps I have used in Excel online:
  1. For WXP Desktop
  1. For WXP Mac (Should autolaunch): This is the method I have used to sideload the addin in Mac and it works fine.

Now my question is the following: Suppose that I submit my manifest for approval to the Microsoft Appstore and it gets approved, After that, a user finds my addin in the Microsoft Appstore and decides to install it in Windows Excel desktop using Home -> Add-ins -> Get Add-ins -> Add. Which behavior of the taskpane will this user see? Will the taskpane autolaunch for this user?

Thank you very much for your help!

yuc014 commented 8 months ago

Hi @HugoAlbertoNieto,

Now, the autolaunch feature is supported through various approaches:

  1. Registry: As demonstrated above for sideloading during the testing phase of add-ins under development.
  2. In-Client Store: If your add-in is uploaded to the store, this approach supports autolaunch.
  3. Central Deployment: Admins can deploy the add-in in Microsoft 365 admin center, and this approach supports autolaunch.
  4. App Source: Users can install the add-in from Microsoft AppSource, autolaunch is supported through this channel.
  5. And more.

I submit my manifest for approval to the Microsoft Appstore and it gets approved, After that, a user finds my addin in the Microsoft Appstore and decides to install it in Windows Excel desktop using Home -> Add-ins -> Get Add-ins -> Add.

This belongs to type 2, autolaunch is supported.

HugoAlbertoNieto commented 8 months ago

Thanks @yuc014. I really appreciate your help. This should be all I need regarding with this topic right now.

I have created a new issue for a different topic, which hopefully you or someone from the team can help us with:

https://github.com/OfficeDev/office-js/issues/3987

Thank you very much again!