title: ExcelReaderFactory, reading first sheet
body: <p>I am using the <code>ExcelDataReaderFactory</code> in C#, in order to read my Excel files and inserting them to a database.<br>
  Right now I am specifying <code>sheetname</code> for the sheet that I want to use.
  Can I make it to be chosen as the first sheet every time?</p>
  
  <p>Here is how I load the data.</p>
  
  <pre><code>public IExcelDataReader getExcelReader()
  {
      // ExcelDataReader works with the binary Excel file, so it needs a FileStream
      // to get started. This is how we avoid dependencies on ACE or Interop:
      FileStream stream = File.Open(_path, FileMode.Open, FileAccess.Read);
  
      // We return the interface, so that
      IExcelDataReader reader = null;
      try
      {
          if (_path.EndsWith(".xls"))
          {
              reader = ExcelReaderFactory.CreateBinaryReader(stream);
          }
          if (_path.EndsWith(".xlsx"))
          {
              reader = ExcelReaderFactory.CreateOpenXmlReader(stream);
          }
          return reader;
      }
      catch (Exception)
      {
          throw;
      }
  }
  
  public IEnumerable&lt;string&gt; getWorksheetNames()
  {
      var reader = this.getExcelReader();
      var workbook = reader.AsDataSet();
      var sheets = from DataTable sheet in workbook.Tables select sheet.TableName;
      return sheets;
  }
  
  public IEnumerable&lt;DataRow&gt; getData(string sheet, bool firstRowIsColumnNames = false)
  {
      var reader = this.getExcelReader();
      reader.IsFirstRowAsColumnNames = firstRowIsColumnNames;
      var workSheet = reader.AsDataSet().Tables[sheet];
      var rows = from DataRow a in workSheet.Rows select a;
      return rows;
  }
  </code></pre>
  
  <p>
  
  <pre><code>getData("april"); //Here I want it to be the first sheet, and not have to choose.
  </code></pre>
  
  <p>Appreciate any advice.</p>