I have a recordset that contains all of the data needed to import into an Excel file. Is there a way I can clone my live recordset into the one created when I open an Excel file?
Here is what I'm trying right now with no luck.
Dim connection : Set connection = Server.CreateObject("ADODB.Connection")
connection.Open "Driver={Microsoft Excel Driver (*.xls)}; DriverId=790;
Dbq=c:\MyExcel.xls;" & _
"DefaultDir=c:\; ReadOnly=False;"
Dim excelRecordset : Set excelRecordset = Server.CreateObject("ADODB.Recordset")
excelRecordset.Open "[SHEET1$]", connection, 2, 3
excelRecordset.AddNew
Set excelRecordset = recordset.clone
excelRecordset.Update
excelRecordset.Close
Thank you.