public ExcelSheet this[string name]
        {
            get
            {
                var retVal =
                    Worksheets.FirstOrDefault(w => w.Sheet.SheetName.Equals(name, StringComparison.OrdinalIgnoreCase));

                if (retVal == null)
                {
                    var mesg = $"Could not find worksheet '{name}'";
                    _logger.Error(mesg);

                    throw new ArgumentException(mesg);
                }

                return(retVal);
            }
        }
예제 #2
0
 public IWorksheet GetSheetByName(string name)
 {
     return(Worksheets.FirstOrDefault(i => i.Name == name));
 }