Accessing Excel files using Ado-odbc.

>I cannot  access  data stored in excel worksheet using
>Adoconnection+adotable. Adotable  doesn't find anything to fill tablename
>property with. I have tried workbook , worksheet, workbook.worksheet  ...
>I have valid Adoconnection, i am using pre-defined user-odbc
>datasource(points to a excel file).

use an ADODataset and Jet 4.0 provider
Set the following for the connection string

Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\someDir\Your.XLS;Extended
Properties=excel 8.0;"";

where c:\someDir\Your.XLS is the spread sheet you want to read.

Set the command type to cmdTable

In the commandtext property editor you should now be able to pick from any of
the worksheets in your spreadsheet.

Brian Bushay (TeamB)