View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
kh kh is offline
external usenet poster
 
Posts: 8
Default Help request for vb .net in excel

Hi
Thank you for your time, appreciated.
Please write to me the complete code, because the lines you wrote are not
working. I am using visual studio vb 2005. Thank you.
Best Regards,
kh

"campwes" wrote:

kh,

You can use an OleDbDataReader (ADO.NET) and query the cells in your range:

Dim cmd As OleDbCommand = dbConn.CreateCommand()
cmd.CommandText = " select * from [Sheet1$A2:A10] "
rdr = cmd.ExecuteReader()

Use Console.WriteLine() or whatever to output the data where you need.

Ciao,