Error reading Excel file

Aug 3 at 4:13 PM
I'm using ExcelDataReader to read my excel file. But when I usu IsFirstRowAsColumnNames and AsDataSet() does not work.

erro message: IExcelDataReader does note contain a definition for 'IsFirstRowAsColumnNames' and no extension method 'IsFirstRowAsColumnNames' accepting a first argument of type 'IExcelDataReader ' could be found.

erro message: IExcelDataReader does note contain a definition for 'AsDataSet' and no extension method 'AsDataSet' accepting a first argument of type 'IExcelDataReader ' could be found.
 FileStream stream = File.Open(filePath, FileMode.Open, FileAccess.Read);
            IExcelDataReader excelReader;
            if (filePath.Contains(".xlsx"))
            {
                excelReader = ExcelReaderFactory.CreateOpenXmlReader(stream);
            } 
            else
            {
                excelReader = ExcelReaderFactory.CreateBinaryReader(stream);
            } 

            excelReader.IsFirstRowAsColumnNames = true;
            DataSet result = excelReader.AsDataSet();

            foreach (DataRow item in result.Tables[0].Rows)
            {
                item[1].ToString();
            }