title: Google App Script - Web App - Get Active Sheet Name
body: <p>I have a Google Apps Script published as a WebApp. In the script, I would like to be able to select the active sheet and get the sheet name.</p>
  <p>For example, I have a spreadsheet with two tabs: Tab1 and Tab2. I am currently viewing Tab2 in the UI.</p>
  <p>When I run the following code I expect thisSheet = &quot;Tab2&quot;. Instead it is always equal to &quot;Tab1&quot;.</p>
  <pre><code>var ss = SpreadsheetApp.getActiveSpreadsheet();
  var sheet = ss.getActiveSheet()
  var thisSheet = sheet.getName();
  </code></pre>
  <p>Keep in mind I will not know what the name of the sheet will be. I realize that it is an issue of context running from the web app, because when I run the function from within the ScriptEditor it performs as expected. Is there any workaround while executing this code from a web app?</p>