title: Download Excel file via AJAX MVC
body: <p>I have a large(ish) form in MVC.</p>
  
  <p>I need to be able to generate an excel file containing data from a subset of that form. </p>
  
  <p>The tricky bit is that this shouldn't affect the rest of the form and so I want to do it via AJAX. I've come across a few questions on SO that seem to be related, but I can't quite work out what the answers mean.</p>
  
  <p>This one seems the closest to what I'm after: <a href="https://stackoverflow.com/questions/6747532/asp-net-mvc-downloading-excel">asp-net-mvc-downloading-excel</a> - but I'm not sure I understand the response, and it is a couple years old now. I also came across another article (can't find it anymore) about using an iframe to handle the file download, but I'm not sure how to get this working with MVC.</p>
  
  <p>My excel file returns fine if I'm doing a full post back but I can't get it working with AJAX in mvc.</p>