public SchoolList Read(string filePath, string sheetName) { var reader = new ExcelReaderPlus(filePath); var table = reader.GetDataTable(sheetName); return(ReadTable(table, sheetName)); }
public List <Sheet> ReadSchema(string filePath) { var reader = new ExcelReaderPlus(filePath); var table = reader.GetSchema(); var sheets = new List <Sheet>(); foreach (DataRow row in table.Rows) { sheets.Add(new Sheet { Name = row.Field <string>(0).Replace("'", "").Replace("$", ""), Index = row.Field <int>(1) }); } return(sheets); }