PDA

View Full Version : excel -> access via ADO conceptual problem...



alimcpill
07-14-2005, 07:32 AM
I hope someone can help me with this, i feel like i'm missing part of the puzzle. I'm connecting via ADO to a spreadsheet, opening the data into a recordset. I then need to add this data to an existing table in an access db. The only way i can think of to do this is to open both the access table and the excel data in 2 recordsets and then go through the data record by record, field by field and constantly add new records to the access table recordset, then calling updatebatch. While this works, it takes a long time and I can't believe there's not a simpler way of doing this. I really need to be able to do something along the lines of
INSERT INTO accesstable SELECT * FROM [recordset populated from spreadsheet]
but i can't see any way of doing this.

Does any body know a quick way of transferring the contents of a recordset into an access table, either an existing one or by creating a new one?
cheers
al

xCav8r
07-14-2005, 07:37 AM
Have you tried TransferSpreadsheet?