String strConn = "Provider=Microsoft.Jet.OLEDB.4.0;" + "Data Source=C:\\Book2.xls;" + "Extended Properties=Excel 8.0;"; DataSet ds = new DataSet(); OleDbDataAdapter da = new OleDbDataAdapter ("SELECT * FROM [Sheet1$]", strConn); da.Fill(ds); DataGrid2.DataSource = ds.Tables[0].DefaultView; DataGrid2.DataBind();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)