You just need to change the code for retrieving data and rest of the code need not be changed.
cnStr = "Provider=Microsoft.Jet.OLEDB.4.0;" +
"Data Source=Persons.xls;Extended Properties=Excel 8.0;";
OleDbConnection cn = new OleDbConnection(cnStr);
OleDbCommand cmd;
DataTable dt = new DataTable("Persons");
try
{
cn.Open();
cmd = System.Data.OleDb.OleDbDataAdapter("select * from [Sheet1$]",
, cn);
System.Data.DataSet ds = new System.Data.DataSet();
cmd.Fill(ds);
dt=ds.Tables[0];
dgv.DataSource = dt
I haven't executed this code but something like this should work.
Hope, it helps :)