Skip to content

Instantly share code, notes, and snippets.

@corespider
Created June 29, 2020 13:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save corespider/348e92c5f01960610737aad276c3a99f to your computer and use it in GitHub Desktop.
Save corespider/348e92c5f01960610737aad276c3a99f to your computer and use it in GitHub Desktop.
CoreSpider - Export Excel in ASP .NET MVC - Controller
public ActionResult Index()
{
return View(GetCustomer());
}
public dynamic GetCustomer()
{
return new List<Customer>()
{
new Customer{ CustomerId=001, CustomerName="John Smith", CustomerAddress="USA", CustomerMobile="7854378560" },
new Customer{ CustomerId=002, CustomerName="Lori orona", CustomerAddress="UK", CustomerMobile="3484767830" },
new Customer{ CustomerId=003, CustomerName="Aakash Singh", CustomerAddress="India", CustomerMobile="6484789045" },
new Customer{ CustomerId=004, CustomerName="Alex Hex", CustomerAddress="Finland", CustomerMobile="2746789045" },
new Customer{ CustomerId=005, CustomerName="Albie Michell", CustomerAddress="USA", CustomerMobile="7643897640" },
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment