using System; using System.Collections; using System.ComponentModel; using System.Data; using System.Data.OleDb; using System.Drawing; using System.Web; using System.Web.SessionState; using System.Web.UI; using System.Web.ui.WebControls; use system.web.ui.htmlcontrols;
Summary description of Namespace Excel {///
} Private dataset createDataSource () {string strconn; strconn = "provider = microsoft.jet.Oledb.4.0;" "data source = c: //inetpub//wwwroot//excel//a.xls;" "extended Properties = Excel 8.0; "; OleDbConnection conn = new OleDbConnection (strConn); OleDbDataAdapter myCommand = new OleDbDataAdapter (" SELECT * FROM [ContactList $] ", strConn); DataSet myDataSet = new DataSet (); myCommand.Fill (myDataSet); Return mydataset;
#Region Web Form Designer Generated Code Override Protected Void OnNit (Eventargs E) {// // Codegen: This call is required for the ASP.NET Web Form Designer. // InitializeComponent (); base.onit (e);} ///
} #Endregion}}}