title: In Excel how to search a value in a column and get all the values in that row using C#
body: <p>I am trying searching a value on column "C" and getting a matched cell name as well, for example C14, now how can I select the values in row 14.
  I tried as :</p>
  
  <pre><code>     private static MyObject GetRowValue(int rowNumber)
       {
          string connString = "";           
          string path = "C:\\Code\\MyFile.xls";           
          connString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + path + ";Extended Properties=\"Excel 8.0;HDR=Yes;IMEX=2\"";
          string query = "SELECT * FROM [Sheet1$A" + rowNumber + ":BD" + rowNumber + "]";
          using (OleDbConnection connection = new OleDbConnection(connString))
          {
              var adapter = new OleDbDataAdapter(query, connection);
              DataSet ds = new DataSet();
              adapter.Fill(ds);
              DataTable dt = ds.Tables[0];
          }
       }
  </code></pre>
  
  <p>If row number is 10, them I am trying to get all values of 10th row only, but it is returning all the rows after 10th row.</p>