read from excel file.ADO?

mirzao

Active member
Joined
Nov 10, 2005
Messages
44
Location
Malaysia
Programming Experience
Beginner
Hi everyone,

I have an application that runs and open an excel file to display the current data. In the same application, I want to read the data inside the excel file to write it to html file. I learned that I can use ADO, but I never used it before and since I am very new to vb.net I need someone to guide me. Thanks for your help.
 
Dear,
This is but simple if u have did it with Access. The process is quite same.
Just use this connection string:
con.connectionstring=
"Provider=Microsoft.Jet.OleDB.4.0; data Source=URLLINKS.xls; Extended Properties= Excel 8.0;"

here, URLLINKS is the excel file am using here. After the connection has been made. You can use the sql queries this way:
cmd.CommandText = "Select * from [Sheet1$]"
here cmd is the command object.
after that just use the command object as u like. viz..either use a data adapter or executenonquery of what ever it be.



 
Back
Top