public ActionResult ImportFromXLSX(HttpPostedFileBase file) { if (file == null) { return(HttpNotFound()); } string filePath = Server.MapPath("~/Content/documents/" + Path.GetFileName(file.FileName)); file.SaveAs(filePath); TransferData export = new TransferData(productService); export.ImportFromXLSX(filePath); return(RedirectToAction("GetAllProducts")); }