3

I have created an Excel add-in using the Office JS library. My add-in works fine with Office 365 but when try to run the same add-in with Office 2019 or 2016 it shows a blank screen only and throws error : Office.js has not fully loaded. Your app must call "Office.onReady()" as part of it's loading sequence (or set the "Office.initialize" function). If your app has this functionality, try reloading this page.

enter image description here

In some GitHub issues, they are saying that Internet Explorer 11 doesn't understand ES6. I have tried converting all arrow functions to normal functions and added target as ES6 in tsconfig also.

Please give any solution for how to run the add-in with all the Office versions.

Eugene Astafiev
  • 47,483
  • 3
  • 24
  • 45
Poojan3037
  • 310
  • 1
  • 9
  • How does your code look like for the task pane? Have you tried creating a new sample add-in with a task pane and run it there? Does it work correctly? – Eugene Astafiev Jul 03 '23 at 13:10

1 Answers1

0

Office Add-in cannot successfully call any Office JavaScript APIs until the library has been loaded. Initialize your Office Add-in article describes the two ways your code can ensure that the library has been loaded:

  • Initialize with Office.onReady().
  • Initialize with Office.initialize.

Make sure you have defined any of them in your add-in.

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