title: Maatwebsite, How to download excel using Ajax?
body: <p>I'm trying to download excel file using Ajax call in Laravel.</p>
  
  <p>I can download using href directly to controller, But I don't think I can send Object through url</p>
  
  <pre><code>let excel_file = $.ajax({
      type: "get",
      url: "api/../excel/previewExport",
      data: {headers : headObject},
      dataType: "json"
  });
  </code></pre>
  
  <p>But it return raw excel data in browser response instead of download. </p>
  
  <p>What Should I do? Thank you in advance.</p>