We need an Office JavaScript API-based Excel add-in, that should be available only within the company, and the usage should be limited only to a few dedicated documents in Excel Online.
We have created a prototype of the add-in, published the manifest to the corporate office app-catalog in SharePoint Online, and added it to an Excel document using the desktop version of Excel. So far so good, it works in that document, and only in that document. If we rename the .xlsx file into a .zip file, we see the necessary folder (webextensions) and the files required to reference the add-in in the ZIP-file structure.
When we upload the same document into OneDrive (in the same tenant, where the add-in was published into the app catalog, of course), and open it using Excel Online, the add-in is not available. After I append the add-in in Excel Online from "My Organization", it will become available, but not only for that document, but also for all other documents (both for the existing ones and the new ones created after). Similarly, if we add the add-in to a document in Office Online, and download that document, we see that the folder and files required for the add-in reference are missing. It seems that adding an Excel add-in from the corporate catalog in the online version is an action for an all or nothing. If I try the same using an add-in from the Office Store (that means, from the MS catalog), the action of appending the add-in seems to be document-related again, it has an effect only for that document, and the registration exists in the ZIP file structure as well.
It's pretty annoying as well, that after I've added the add-in in Excel Online from the corporate store to a document (that has apparently a global effect to all of my online Excel documents), I do not find a way how to undo this action, and remove the add-in I've just added, expect I remove it completely from the corporate store. There is no such problem if the add-in comes from the Office Store.
// Remark: I've tried, of course, to install the add-in in M365 as Integrated App (https://admin.microsoft.com/Adminportal/Home?source=applauncher#/Settings/IntegratedApps) as well (see: https://techcommunity.microsoft.com/t5/microsoft-365-blog/manage-and-deploy-microsoft-365-apps-from-partners-in-the/ba-p/1194324), but in this case was the add-in immediately available in all documents in Excel Online, even without I would have to add it to any Excel document at all.
I don't now, if it is "by design" or at least a "known issue", or do I make something completely wrong, and it should be work. Could you, please, share your experience? Thanks in advance!
UPDATE: If I remove the "Command Mode integration" part (see extended explanation below!) from the manifest (which I actually do not really need, but was generated automatically by Visual Studio), than it seems to function as I expected, that means the task pane is added to / display with the document, if / when I add the add-in, and the add-in registration is persisten in the .xlsx files. Although I am happy with the current behavior, I leave the question open. Probably has somebody an explanation for this limitation (?), or at least a link, where it is described / documented.
Explanation of "Command Mode integration" part: It is the range in the manifest (generated automatically by Visual Studio) between the comments
<!-- Begin Add-in Commands Mode integration. -->
and
<!-- End Add-in Commands Mode integration. -->
It means actually the element VersionOverrides
and all of its child nodes / content.
I've just find another problem here with a similar VersionOverrides
issue:
"So the issue was that on the desktop version of Excel, the URL to the images has to be in a certain form. Changing this fixed all my issues"
I'll give you an update if I succeed to limit the problem further.