LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default using ADO on an excel spreadsheet

Hello,

I am using ADO to query the contents of an excel spreadsheet, and I have
worksheet called WS_1 and there is a number of columns in the spreadsheet. I
want to be able to sort on the product column and I am getting an error
message saying

Too few parameters, Expected 1.

This is how I am connecting to the spreadsheet

'Set the connection string
strConn = "DRIVER=Microsoft Excel Driver
(*.xls);DriverId=790;ReadOnly=True;" & "DBQ=" & strFile
'Open the recordset
.Open strSql, strConn

And this is the select statement I am passing into the spreadsheet
SELECT * FROM [WS_1$] ORDER BY Product

If I use SELECT * FROM [WS_1$] then it doesn't give any errors, but as soon
as I add the order by clause then it gives me errors.

I am using Excel 2000 SP3.

Any help would be appreciated. Thanks.

JD


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
convert ms works spreadsheet to excel spreadsheet on pda d Excel Discussion (Misc queries) 0 February 20th 06 10:40 AM
conversion of MS Works Spreadsheet to Excel 2002 Spreadsheet Kellie Excel Discussion (Misc queries) 1 March 24th 05 06:31 PM
Is there a way to insert a formula, password or macro in an excel spreadsheet that will automatically delete the spreadsheet? oil_driller Excel Discussion (Misc queries) 1 February 8th 05 09:34 AM
Macro to save excel XP spreadsheet to excel 97 spreadsheet format Mas[_5_] Excel Programming 1 February 11th 04 08:44 PM
How to open another Excel spreadsheet to copy data into current spreadsheet ? Ricky Pang Excel Programming 0 July 13th 03 01:59 PM


All times are GMT +1. The time now is 06:59 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"