I am searching for a tutorial or code to help me understand how to import into an access db, to multiple tables from an excel spreadsheet with multiple sheets. The names for each sheet inside the excel spreadsheet corresponds to the names of each table inside the access db. So, I want to import the data from the 'UserAccount' sheet inside the excel spreadsheet to the "UserAccount' table inside the Access db, and so on thru multiple sheets to multiple tables.
Loading
RICHARD KNOXPosted Apr 22, 2024, 1:16 PM
I fixed the issues with the Try/catch and the exception it was throwing, but I am still only getting one row (header) in each table inserted. I have a datagridview attached to the incoming data and it shows its there, but why only one row is being insert is I can't figure out.
Help, any please tell me why?
RICHARD KNOXPosted Apr 19, 2024, 2:19 PM
I updated the code with specifics for my project and the code works great, but it is not transfering all the data, it is just trying to create the tables inside the database but crashes if the tables exist, so I added the Try/Catch to catch the except and it still throwing an exception. If I comment out the table creation portion of the code, it only imports the first row of data which is the column names, but there are additional rows and they are not transfered.
Vijay Pratap SinghPosted Apr 19, 2024, 12:26 AM
Here's a basic outline of how you can achieve this:
Hope this will help.
Thanks