how to write excel content type while returning from mvc view
Code Example - how to write excel content type while returning from mvc view
Response.ContentType = "application/application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
Response.AppendHeader("content-disposition", "attachment; filename=myfile.xlsx");