|
-
August 5th, 1999, 04:13 PM
#1
Using ADO to access MSExcel
Hi,
This is how I open a table called "employees" in my database,
and it works fine.
Now, I want to access a worksheet named "sheet1$" in my Excel file,
and I have problem with that. Can you help me out ? Thanks
Dim cnnExcel As ADODB.Connection
Dim cmdExcel As ADODB.Command
Dim rsExcel As ADODB.Recordset
cnnExcel.ConnectionString = strCnn
cnnExcel.ConnectionTimeout = 30
cnnExcel.Open strCnn
rsExcel.CursorLocation = adUseServer
rsExcel.LockType = adLockReadOnly
rsExcel.Open "employees", cnnExcel, , , adCmdTable
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|