I have tried it using Excel 2003. I have typed exactly the steps I took to establish the connection and to query the workbook.
Connecting to a workbook (.xls) Connect
New Connection
Database Connection Wizard
Select Database Type: Excel
Press Next
Enter database file (in my case c:\code\test.xls)
Press Next
Selected the OLEDB driver (Provider Microsoft Jet OLEDB.4.0)
(I could also have selected the ODBC driver (Provider MSDASQL))
I return to the Database Connection dialog
The new connection is selected
I just press OK to connect to the database
(leave the password field blank and leave the user as Admin)
Querying the workbook: Open the SQL dialog
Show Editor...
Expand the Schemas node
Expand the Current Schema node
Expand the tables node
I now see 3 "tables": Blad1$, Blad2$ and Blad3$
Note that my Excel version is in Dutch. In English it would probably be:
Sheet1$, Sheet2$ and Sheet3$
I select "table" Blad1$
Expand Blad1$
Expand Columns node
Now I see that there are 3 columns I can query.
I entered a small table in the sheet. I entered aa, bb and cc in
cells A1, A2 and A3 respectively. Below it I entered a few rows with
values.
I enter the following SQL in the editor:
select * from [Blad1$]
Press: Return SQL to SQL*XL
Returning to the SQL dialog I press OK to run the query
The data returns to the sheet.
I immediately open the SQL dialog again.
I change the table name to Blad2$ and run the query
The data is also returned to the worksheet.
It seems to work just fine for me. Perhaps you can repeat my steps and see where it fails for you. I have attached the workbook I tested it with to this post so you can try it exactly as I have tried it above.
Let me know if you need further assistance.
Reference: Connect to Excel XLS files
http://www.oraxcel.com/cgi-bin/yabb2/YaBB.pl?num=1163266753