Bill Reid
Bill Reid

Reputation: 21

Loading Excel addin on the web vs desktop

We are creating a go/react based webapp that we will be pointing to with our excel task pane addin. This webapp will need to redirect to another page to log into the application, which will then redirect back to the original page.

When we create the manifest file and add it (through a shared folder) to the desktop version of excel, the app redirects to the logon page, I can enter my credentials and then it redirects back and loads perfectly. This is the experience that we want.

However, when we are using the web-based version of Excel and we choose to 'Upload my Add-in' using the same manifest file, it redirects to the logon page, but the screen is disabled and eventually fails. Excel gives us a 'try again' message. If I try again it fails a second time. This time Excel gives us the option to 'Start anyway'. If I do that, then I can logon and it redirects back, but then I go through the process of two failures before I have the option to start the original page, at which point it loads up.

Does anyone know the difference between desktop and web in how they read the manifest that might be causing this? Is there anywhere to look for more information as to why it is failing?

Upvotes: 1

Views: 340

Answers (1)

Bill Reid
Bill Reid

Reputation: 21

According to this page https://learn.microsoft.com/en-us/office/dev/add-ins/develop/loading-the-dom-and-runtime-environment

you have to "If you do not call Office.onReady or assign an Office.initialize event handler, your add-in may raise an error when it starts. Also, if a user attempts to use your add-in with an Office web client, such as Excel, PowerPoint, or Outlook, it will fail to run.

If your add-in includes more than one page, whenever it loads a new page that page must either call Office.onReady or assign an Office.initialize event handler."

Since our logon app is shared by many other apps we can't modify it to include office.js and assign the Office.initialize event, but it is possible to add "custom content" to our logon page that runs in an iframe that we can do that in.

Upvotes: 1

Related Questions