The Microsoft Office Access database engine could not find the object 'Sheet1$$A7:B'. Make sure the object exists and that you spell its name and the path name correctly.
using (OleDbConnection excel_con = new OleDbConnection(conString))
{
excel_con.Open();
string sheet1 = excel_con.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null).Rows[0]["TABLE_NAME"].ToString();
DataTable dtExcelData = new DataTable();
//[OPTIONAL]: It is recommended as otherwise the data will be considered as String by default.
dtExcelData.Columns.AddRange(new DataColumn[3] { new DataColumn("PersonId", typeof(int)),
new DataColumn("Name", typeof(int)),
new DataColumn("Salary",typeof(decimal)) });
using (OleDbDataAdapter oda = new OleDbDataAdapter("SELECT * FROM [" + sheet1 + "$" + "A7:B]", excel_con))
{
oda.Fill(dtExcelData);
}
excel_con.Close();