Repository.Import.ExcelImport.Les C# (CSharp) Method

Les() private method

private Les ( ExcelWorkbook workbook, string sheetName, Action action ) : void
workbook OfficeOpenXml.ExcelWorkbook
sheetName string
action Action
return void
        private void Les(ExcelWorkbook workbook, string sheetName, Action<ExcelWorksheet> action)
        {
            var sheet = workbook.Worksheets.FirstOrDefault(x => x.Name == sheetName);

            if (sheet == null)
                return;

            if (sheet.Dimension == null)
                return;

            action(sheet);
        }