javascript - How to determine if an Office Add-in is running under Excel or Excel Online? -


i'm writing office add-in (formerly, apps office). i'm using office.js , in point of code want check if app running in excel (desktop software) or running on web (excel online)

something like:

if (office.isrunningonweb){     // something. } 

you can use document type:

if (microsoft.office.webextension.context.document instanceof osf.dda.excelwebappdocument) {                                     //your app running on web                                 }  if (microsoft.office.webextension.context.document instanceof osf.dda.exceldocument) {                                     //your app running in excel                                 } 

Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -