Export To Excel c#
Add this file to your project:
Export To Excel File Use nuget: Install-Package DocumentFormat.OpenXml
/* To create excel file use next line: */ CreateExcelFile.CreateExcelDocument("Put Your Model here".ToList(), "Name.xlsx", Response);
- Don't forget to change namespace in the file :)