I have seen another answer to this, but I could not get it to work and I was not allowed to ask another question.
How to determine if an Office Add-in is running under Excel or Excel Online?
I find that there are often occurrences where Excel Online just does not behave the same as Excel Desktop. I know it should but it doesn't, so I really need to be able to control behaviour to get me out of a hot spot.
How can I tell which version of Excel I am using.
I have seen the following code, but it just hangs my javascript:
if (Microsoft.Office.WebExtension.context.document instanceof OSF.DDA.ExcelWebAppDocument) {
//Your app running on the web
}
if (Microsoft.Office.WebExtension.context.document instanceof OSF.DDA.ExcelDocument) {
//Your app running in excel
}
The issue is to do with OSF.DDA.... These do not come up in my intellisense, so I wonder, do I have something missing?