title: Google script - link to download /export file from google sites
body: <p>on google sites i have a search page and i need to insert a button to export to a spreadsheet the search. The script creates a spreadsheet with the information and provides a download link.</p>
  <ul>
  <li>How can I do this without reloading the search page?</li>
  <li>is it possible to open a modal or a window over the page to display the link?</li>
  <li>how can I fill in the <code>doGet()</code> event argument from the search page?</li>
  </ul>
  <p>In another implementation, I had a problem with the sandbox, saying that downloading was disabled in chrome since update 83. is there any way to solve this?</p>
  <p>Or if anyone has another solution for all of that, it would be most welcome. I appreciate the collaboration.</p>
  <p>my code.gs:</p>
  <pre><code>  function doGet(e)
    {
      var report = e.parameter.report; //// how to fill a 'parameter' in search.html ?
    
      if(report) 
      {
        var planilha = SpreadsheetApp.create('asd');
        // fill the Spreadsheet
        var ssID = planilha.getId();
        var URL = 'https://docs.google.com/spreadsheets/d/'+ssID+'/export?format=xlsx';
        return ?? /// returns what exactly?
      }
      
      return HtmlService.createTemplateFromFile('search').evaluate();
  }
  </code></pre>