@michael_o in addition to what @LukasS suggested you might want to take a look at this thread about UPDATE and MERGE. I tried to construct an example where new data gets entered into a database in several loops.
From what I understand you might have to clearly define what your scenario is and what you want to do with your data.
- update existing IDs with new data from all or several lines of your Excel files
- insert new data into the database
or both? Or do you not want existing data to be altered?