>OpenFileDialog dialog = new OpenFileDialog(); >dialog.Filter = "Excel Files (*.xls)|*.xls|All files (*.*)|*.*"; >dialog.InitialDirectory = @"c:\"; >dialog.Title = "Select an SQA file"; >DialogResult Result = dialog.ShowDialog(); > >if(Result == DialogResult.OK) >{ > string FileName = dialog.FileName; > DataAccess da = new DataAccess(); > da.ProviderInvariantName = "System.Data.OleDb"; > > da.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + FileName + ";" + "Extended Properties=Excel 8.0;"; > > DataSet ds = da.ExecuteQuery("select * from [New Quote$]", CommandType.Text); >} >>