If you set the Primary Key fields on your table, it will not allow duplicate records to be imported, and automatically block them from being imported without any need for any special code.
Alternatively, if the records are Excel are truly duplicates (where every field is the same), it would be even easier to use Excel's built-in "Remove Duplicates" functionality before importing.