public ActionResult ExportToXslx(CustomerFilterVM filter) { if (ModelState.IsValid) { filter.Letter = filter.Letter == "%" ? string.Empty : filter.Letter; int pageSize = CastleClub.BusinessLogic.Data.GlobalParameters.PageSize; try { string path = CustomersManager.GetFilterCustomersToExcel(filter.Letter, filter.Page, pageSize, filter.Word, filter.All, filter.OnlyActive, filter.SiteName); return(Json(new { success = true, fName = path }, JsonRequestBehavior.AllowGet)); } catch (Exception) { return(Json(new { success = false }, JsonRequestBehavior.AllowGet)); } } return(null); }