I have a table called Products
in my database. It has a couple of attributes, but nothing complex.
This is on a ASP.Net MVC3 application using Entity Framework 4 for data access, and I just want to create an ActionMethod that returns a downloadable (generated on request) excel file containing all the data inside the table.
What is the simplest way to generate an excel file from data in a table?
I'm using .NET 4, so the latest technologies/options are available to me.
I agree with xanadont's comment (csv is easier), but if you're using EF (probably, but not specified) and need to export an excel file this will do this trick: