




















string strConn = " Provider = Microsoft.Jet.OLEDB.4.0 ; Data Source ="+ViewState["filepath"].ToString()+";Extended Properties=Excel 8.0" ;
OleDbConnection conn = new OleDbConnection(strConn);
conn.Open();
OleDbDataAdapter adp = new OleDbDataAdapter("Select * from [Sheet1$]",conn);
DataSet ds = new DataSet();
adp.Fill(ds,"Book1");
ExlDataGrid.DataSource = ds.Tables["Book1"].DefaultView;
ExlDataGrid.DataBind();
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。