title: How to determine if an Office Add-in is running under Excel or Excel Online?
body: <p>I'm writing an Office Add-in (formerly, Apps for Office). I'm using <code>office.js</code> and in some point of code I want to check if the app is running in excel (desktop software) or running on the web (Excel Online)</p>
  
  <p>Something like:</p>
  
  <pre><code>if (Office.IsRunningOnWeb){
      // Do something.
  }
  </code></pre>