public ActionResult AnalyzeFile() { if (Request.Files.Count == 0) { throw new ArgumentException("请选择上传文件"); } var file = HttpContext.Request.Files[0]; var fileName = file.FileName; if (string.IsNullOrEmpty(fileName)) { throw new ArgumentException("请选择上传文件"); } var filePath = FileManager.Upload(file); var list = ExcelManager.AnalyzeLandRecord(filePath); Core.LandRecordViewManager.AddRange(list, Identity.UserID); return(RedirectToAction("Index")); }