if (textBox1.Text != null)
{
string a=arr[0];
String con =@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source='D:\Book1.xlsx';Extended Properties='Excel 12.0 Xml;HDR=NO;IMEX=1'";
OleDbConnection conn = new OleDbConnection(con);
OleDbCommand cmd = new OleDbCommand("SELECT * FROM [Book1]", conn);
da = new OleDbDataAdapter(cmd);
da.Fill(ds);
dataGridView1.DataSource = ds.Tables[0];
}
problem is -- The Microsoft Office Access database engine could not find the object 'Book1'. Make sure the object exists and that you spell its name and the path name correctly.