Jaima Joseph

Jaima Joseph

  • NA
  • 94
  • 107.8k

How to transfer data from MVC HTML view to Excel file

Dec 12 2013 11:42 PM
Hi,I have to transfer data entered in HTML view in my MVC application to an excel file when I click on a submit button.I have tried something like Response.AddHeader("content-disposition", "attachment; filename=OnlineQuotes.xls"); Response.AddHeader("Content-Type", "application/vnd.ms-excel"); return View(); in my Controllers action method.But it is not working.Also I have tried using a javascript,that is saving the page source code to a file.I want to append a row to the excel file which should be the data entered in my table's tds. Anybody can help??

Answers (3)