• The problem with loading data from Excel is that the providers "guess" the data types according to the contents of the column.

    So if the first time a column contains only numbers, SSIS will take a numeric data type. If the second time the column suddenly contains text, the data type will change to string and SSIS will crash because the metadata has changed.

    So your first check should be to verify if the data types are the expected ones.

    You can simply do this by trying to load the Excel data to a staging table. If it succeeds, all is well. If it fails for whatever reason, you can discard the Excel file. There are constructs in SSIS to deal with these types of failures: you can connect the data flow to a File System Task using an OnFailure precedence constraint (the red arrow) and move the Excel file to an error directory for example.

    If the Excel file has loaded to the staging table, you can do validation of the data itself. You can use TSQL for the easiest tasks, but if it gets too complex (for example regular expressions), you might want to use a .NET script component in the SSIS data flow.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP