MVC 2 Pass View to Controller to generate Excel file on the fly

Is there a way to transfer data from the view to the controller so that I can get the data and create the .xls file on the fly?

Any help or thoughts are appreciated.

Greg

+3
source share
2 answers

The easiest way is to create a CSV file that can be opened directly using Excel.

Alternatively, you can use COM Interop to generate Excel files.

Data is transferred from the view to the controller method in the usual way. If you need help getting a collection of strings from a view, see here .

, FileResult.

+3

Source: https://habr.com/ru/post/1745593/


All Articles