title: Can't read from my Excel file using C#
body: <p>I have an Excel 2007 file "my.xlsx" and a sheet named "States", and I have the following code</p>
  
  <pre><code> using (OleDbConnection con = new OleDbConnection(@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=c:\my.xlsx;Extended Properties='Excel 12.0 Xml;HDR=NO'"))
          {
              OleDbCommand cmd = new OleDbCommand("select * from [States]", con);
  
              con.Open();
              OleDbDataReader reader = cmd.ExecuteReader();
              while(reader.Read())
                  Console.WriteLine(reader[0]);
          }
  </code></pre>
  
  <p>It keeps throwing exception saying "The Microsoft Office Access database engine could not find the object 'States'.  Make sure the object exists and that you spell its name and the path name correctly.".  </p>
  
  <p>Could someone help to see what's wrong with my code please?</p>