I want to return Excel file (using NPOI library) to user without the need to save the file in the server first. Here's my code :
[HttpPost]
[ValidateAntiForgeryToken]
public ActionResult Report(SalesReportViewModel model)
{
if (ModelState.IsValid)
{
XSSFWorkbook wb = context.GetReport(model);
//I have no idea what to return after I got my wb
}
return View();
}
Any help will be appreciated.