View Full Version : Importing Excel Spreadsheet


Milazim
10-29-2008, 11:00 PM
Hi,

I have an Excel spreadsheet that I want to import to the Ms Access db via code. The problem is though that data needs to be imported to two existing Access tables related to each other with 1 to many relationships (I'm not sure if this is possible). The code that imports a spreadsheet to a singe table I found here: http://www.databasejournal.com/features/msaccess/article.php/3557541 (http://www.databasejournal.com/features/msaccess/article.php/3557541)
This code though replaces the exiting data in Ms Access table which I don’t want.
I want the code to import the data from a spreadsheet to existing table as new record without replacing existing data. Any help will be appreciated.

ByteMyzer
10-30-2008, 12:55 AM
Did you actually TRY the code? I found nothing in it that indicates that it deletes existing data, no DELETE sql statements, no .Delete methods on the recordset rstWrite. As far as I can tell, the code should do exactly what you want.