3
Answers

How to transfer data from MVC HTML view to Excel file

Ask a question
Jaima Joseph

Jaima Joseph

10y
7.3k
1
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)