Export html table to excel in asp.net MVC2
Hi am looking for the best way on how export to excel does in ASP.NET MVC Now i got this one from billsternberger.net Export to Excel or CSV from ASP.NET MVC with C# //Export to excel public ActionResult Download() { List<Lookup> lookupList = data,GetLookupList(); var grid = new System.Web.UI.WebControls.GridView(); grid.DataSource = lookupList; grid.DataBind(); Response.ClearContent(); Response.AddHeader("content-disposition", "attachment; filename=YourFileName.xlsx"); Response.ContentType = "application/vnd.ms-excel"; StringWriter sw = new StringWriter(); HtmlTextWriter htw = new