|
-
September 13th, 2001, 10:53 AM
#1
ADO/Excel
Hi There,
I have a recordset that has data from multiple tables, I need to write this data
to an excel spread sheet using ADO, I know how to select from an Excel spread sheet, but is stuck up on this factor that I need to insert into the Excel Spread Sheet, pls give me a clue as to how to do it.
Dim cn as ADODB.Connection
set cn = new ADODB.Connection
'to Open the Connection to the Specified Excel File
With cn
.Provider = "Microsoft.Jet.OLEDB.4.0"
.ConnectionString = "Data Source=C:\MyFolder\MyWorkbook.xls;" & _
"Extended Properties=Excel 8.0;"
.Open
End With
The above code I use to connect to Excel, Now I need to open the recordset and write to the Excel Spread Sheet.
Pls help.
Thanks in advance
Dipu Thomas
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
|