Hi,

In my application I want to import from a excel sheet. I wrote some code that imports all the data from the excel sheet into an dataset by using a oledbdataadapter. But I would like to create a dataadapter that selects specific rows in the excel sheet based on a the appearance of a hitword in a column of the excel sheet.

I would try something like:

SQLExcel = "SELECT * FROM [sheet1$]"

if hitword <>"" then
SQLExcel = SQLExcel & "WHERE ?????? LIKE " &hitword

end if

The problem with this code is that I don't know how to select a column in the excelsheet: ??????

Any ideas?


thanks
Tom