title: C# import excel to datagridview
body: <p>i want to import excel file to datagridview1  and i am getting this error.
  How can i solve this error?</p>
  
  <p>Error   CS1061  'IExcelDataReader' does not contain a definition for 'IsFirstRowAsColumnNames' and no extension method 'IsFirstRowAsColumnNames' accepting a first argument of type 'IExcelDataReader' could be found (are you missing a using directive or an assembly reference?) </p>
  
  <pre><code>private void dosyasec_Click(object sender, EventArgs e)
  {
      using (OpenFileDialog ofd = new OpenFileDialog() { Filter = "Excel Workbook|*.xlsx*", ValidateNames = true })
      {
          if (ofd.ShowDialog() == DialogResult.OK)
          {
              FileStream fs = File.Open(ofd.FileName, FileMode.Open, FileAccess.Read);
              IExcelDataReader reader = ExcelReaderFactory.CreateOpenXmlReader(fs);
             // DataSet result = reader.AsDataSet();
              reader.IsFirstRowAsColumnNames = true;
              result = reader.AsDataSet();
              comboBox1.Items.Clear();
              foreach (DataTable dt in result.Tables)
                  comboBox1.Items.Add(dt.TableName);
              reader.Close();
          }
      }
  
  }
  </code></pre>