title: jqgrid + EF + MVC: How to export in excel? Which method you suggest?
body: <p>I am using <strong>jqgrid (standard) with EF 4 + MVC3</strong>. I'd like to implement excel export. Which method you would suggest me? </p>
  
  <p>To generate excel, <strong>I'd like</strong> to use <a href="http://stephenwalther.com/blog/archive/2008/06/16/asp-net-mvc-tip-2-create-a-custom-action-result-that-returns-microsoft-excel-documents.aspx" rel="nofollow noreferrer">this library</a> by Dr Stephen Walther, which has three types of output and allows to define headers too. Please tell me if you find it valid for my purpose.</p>
  
  <p>I ask this question because I am still approaching to implement excel export and I found several techniques. Some suggest making a csv export, others indicate that it should return a JSON output and it is not clear to me whether this capability is present in the free version of jqgrid. In any case, I would like to pass the data to Walther's object.</p>
  
  <p>About the jqgrid code, I found <a href="https://stackoverflow.com/a/8228383/1129461">this interesting answer</a> by Oleg, but I do not understand if could be applied to my needs.</p>
  
  <p>Unfortunately, by now I only found parts of solutions for excel export with EF MVC, but no solution or complete examples...</p>
  
  <p><strong>About the MVC logic, I am going to implement and develop <a href="https://stackoverflow.com/a/9336170/1129461">this code</a> as kindly suggested by @Tommy.</strong></p>
  
  <p>Please sorry if the question could be silly, I am just a (enthusiast) beginner.</p>
  
  <p><strong>Thanks for your precious help!</strong>
  <strong>Best Regards</strong></p>