title: import CSS and JS from the same GAS project into Spreadsheet HtmlOutput
body: <p>I'm following <a href="https://developers.google.com/apps-script/guides/html/best-practices" rel="nofollow noreferrer">this</a> tutorial, I'm trying to import into a GAS Html file a CSS and a JS file, both within the same project. The tutorial works fine as a <strong>web app</strong>, what I want to do now is to show an HtmlOutput on the associated spreadsheet, with the same content.</p>
  
  <p>I tried to create the HtmlOutput on the Spreadsheet as follows:</p>
  
  <pre><code>function test(request){
      var html = HtmlService.createHtmlOutputFromFile('Page');
      ss.show(html);
  }
  </code></pre>
  
  <p>and I'm getting this result (as you can see the <strong>getContent</strong> and the <strong>include</strong> are not working as expected):</p>
  
  <p><img src="https://i.stack.imgur.com/JX4gX.png" alt="enter image description here"></p>
  
  <p>These are the html, css and gs documents:</p>
  
  <p><strong>Code.gs</strong></p>
  
  <pre><code>//--- this function is called onclick on a Spreadsheet custom menu
  function test(request){
      var html = HtmlService.createHtmlOutputFromFile('Page');
      ss.show(html);
  }
  
  function include(filename){
    return HtmlService.createHtmlOutputFromFile(filename).getContent();
  }
  </code></pre>
  
  <p><strong>Page.html</strong></p>
  
  <pre><code>&lt;?!= getContent("Stylesheet.html"); ?&gt;
  
  &lt;div&gt;
  &lt;h1&gt;Welcome&lt;/h1&gt;
  &lt;p&gt; test &lt;/p&gt;
  &lt;/div&gt;
  
  &lt;?! include('Javascript'); ?&gt;
  </code></pre>
  
  <p><strong>Stylesheet.html</strong></p>
  
  <pre><code>&lt;style&gt;
  p{ 
      color: green;
  } 
  &lt;/style&gt;
  &lt;div&gt;
  
  &lt;/div&gt;
  </code></pre>
  
  <p><strong>Javascript.html</strong></p>
  
  <pre><code>&lt;script&gt;
  window.addEventListener("load", function(){
      alert("loaded!");
  });
  &lt;/script&gt;
  &lt;div&gt;
  
  &lt;/div&gt;
  </code></pre>
  
  <p>Am I missing something?</p>
  
  <p>Thanks in advance, best regards</p>