1

Before making the add-in available we have to add the following in the manifest to prevent the add-in for being loaded in Excel Web: <Set Name="OpenBrowserWindowApi" MinVersion="1.1"/>

  <Requirements>
      <Sets DefaultMinVersion="1.1">
          <Set Name="SharedRuntime" MinVersion="1.1"/>
          <Set Name="OpenBrowserWindowApi" MinVersion="1.1"/>
      </Sets>
  </Requirements>
  1. Make add-in available for the whole organization
  2. Install add-in locally on Excel Desktop
  3. Open Excel Desktop & save an Excel document in the cloud with add-in loaded.
  4. Open document in Excel Web
  5. Add-in gets loaded( I see the ribbon and everything) but it is not working ( errors with add-in not available )

Not OK: When I open the document in Excel Web I expect that my add-in will not be available at all because as it says in the manifest OpenBrowserWindowApi should be available for the client. Excel Web does not support OpenBrowserWindowApi and it should not even load the add-in as the manifest states it as a requirement.

Not sure how to prevent the add-in from being loaded when we are in Excel Web.

Do you know some other alternatives for preventing the add-in to be loaded in Excel Web ?

Eugene Astafiev
  • 47,483
  • 3
  • 24
  • 45

1 Answers1

0

Try to specify the minimum required version in the tag under OfficeApp, not VersionOverrides.

Eugene Astafiev
  • 47,483
  • 3
  • 24
  • 45
  • Currently it is specified under OfficeApp -> Requirements -> Sets and not under VersionOverrides and it is still reproducing – user1532809 Oct 18 '22 at 14:47
  • Have you tried to specify these requirements in both places? Have you cleared the cache before testing the add-in? – Eugene Astafiev Oct 18 '22 at 14:55
  • I've tried to also add it to VersionOverrides but this will not validate the manifest as the Requirements/Sets/Set are not supposed to be in the VersionOverrides – user1532809 Oct 19 '22 at 08:03
  • 1
    ok, I found out what the issue is: if I make a call to Office.addin.setStartupBehavior(Office.StartupBehavior.load). Next time I open excel document Excel Web/ Excel Desktop, the add-in will be by default loaded, which is not desired because the requirements in the manifest should prevent this. – user1532809 Oct 19 '22 at 13:41