public IActionResult Index() { // Get files List From Path //var data=ExcelLoanServices.ReadExcelFileData(filesList, _hostingEnvironment.WebRootPath,new PersonTest().GetType()); //ExcelLoanServices.ReadFile(filesList,_hostingEnvironment.WebRootPath); return(View(new FolderFileListViewModel { FileListModels = ExcelLoanServices.GetFileListByTypes(_hostingEnvironment.WebRootPath) })); }
public IActionResult ReadFiles() { try { var filesList = ExcelLoanServices.GetFileListByTypes(_hostingEnvironment.WebRootPath); //var data = ExcelLoanServices.ReadExcelFileData(filesList, _hostingEnvironment.WebRootPath, new PersonTest().GetType()); ExcelLoanServices.ReadFile(filesList, _hostingEnvironment.WebRootPath); return(Json(new { success = true })); } catch (Exception ex) { return(Json(new { success = false, error = ex.Message })); } }