this is the code that may help you to perofrm the first three steps,okCode:Using con As New OleDbConnection("Provider=Microsoft.Jet.Oledb.4.0 ; Data Source=database.xls ; Extended Properties=Excel 8.0") con.Open() Dim cmd As New OleDbCommand("select * from [sheet1$] where YourColumnName=@columnname", con) cmd.Parameters.AddWithValue("@columnname", TextBox1.Text) Dim dr As OleDbDataReader dr = cmd.ExecuteReader() dr.Read() End Using
now if you are working with excel then you might be knowing how to do the step 4.
and for steps 5 to 7......you have to do it yourself since i consider that you are not a beginner
Now,before posting some queries please check your code twice or thrice as i think there should not be any more question regarding this as gary have shown you the steps of doing it and i have given you an outline idea of how to implement these steps
![]()




Reply With Quote
