Извините, что задаю очень простой вопрос, я новичок в ASP.NET.Я просто хочу знать, как сохранить загруженный файл Excel в определенную папку.Вот мой код для загрузки листа Excel.
public void ExcelForMonthlyReport(DateTime? startDate, DateTime? endDate)
{
MonthlyReportExcel excelMonthlyReport = new MonthlyReportExcel();//This class has all excel formating.
Response.ClearContent();
Response.BinaryWrite(excelMonthlyReport.GenerateMonthlyReport(GeMonthlyUploadData(startDate, endDate)));//method which gives data for excelsheet.
Response.AppendHeader("content-disposition", $"attachment; filename = Monthly Report {DateTime.Now:yyyy-MM-dd - HH.mm.ss}.xlsx");
Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
Response.Flush();
Response.End();
}