public async Task <string> FilesReadyForContent(IMatFileUploadEntry[] files) { try { var file = files.FirstOrDefault(); if (file == null) { return("File can't be empty"); } DataTable datatable = await GridToExcelBase.GetDataTableAsync(file, GridColumnBases); List <object> objectList = Task.Run(() => ConvertDataTable(datatable)).Result; return(await ProcessItemsUploaded(objectList)); } catch (Exception e) { return(e.Message); } }
public async virtual Task <byte[]> DownloadExcel(IEnumerable <object> itemList) { GridToExcelBase gridToExcel = new GridToExcelBase(); return(await Task.Run(() => gridToExcel.GenerateReport(itemList.ToList(), this))); }