I have the following controller method that will return the data in model. How do I export all the data to excel?
public ActionResult iDeal_Table_Display(Guid? SA = null)
{
var iDConfig = webservice.Get_iDealConfigs(SA,null,null,null,null,null,null, out retStatus, out errorMsg);
var model = iDConfig.Select(ic => new iDealModel2
{
SaPrefix = ic.PrefixName,
CalendarCode = ic.CalendarCodeName,
CashnCarry = ic.isCashnCarry,
FreeMM = ic.isFreeMM,
OnContract = ic.isOnContract,
ProductId = ic.ProductName,
RequestTypeId = ic.RequestTypeName
}).ToList();
return PartialView(model);
}