public void GetTopRowsTest() { DataTable dataTable = null; using (IExcelDataReader excelReader = ExcelReaderFactory.CreateBinaryReader(Helper.GetTestWorkbook("TestMultiSheet"))) { if (!excelReader.IsValid) { throw new Exception(excelReader.ExceptionMessage); } dataTable = excelReader.GetTopRows(5, new SheetParameters("Sheet2", false)); } Assert.AreEqual(5, dataTable.Rows.Count); }