Export to Excel in Asp.net MVC

I am working on an ASP.NET MVC application where I need to export data to an Excel spreadsheet. Earlier in webforms applications, I used some code that I found to display the GridView as an excel compatible file. It was very convenient. I was wondering what the fastest / most efficient way is to do this in MVC. Thank.

+21
asp.net-mvc
Nov 19 '08 at 14:15
source share
2 answers

One simple option is to create a view to render the XML version of the Excel file. You can use the new version of Office 2007 or an older version of 2003. We chose the 2003 version so that more people can use it, but that's for you, of course.

XML 2003 ref on MSDN

XML 2007 ref on MSDN

+11
Nov 19 '08 at 14:19
source share
+20
Nov 19 '08 at 16:34
source share



All Articles