I have inserted data into a dummy excel file. I have saved it on a temp folder of my web application. Now I want to download this file to the downloads folder from browser using ClosedXML
. I have excel file path of my excel. All i need to download this excel from browser by using that file path.
Here is my last lines of code :
string excelFilePath = HttpContext.Current.Server.MapPath("~").Replace("\\", "/") + "SummaryOutputExcel.xlsx";
worksheet.Workbook.SaveAs(excelFilePath);
workbook.Dispose();