I want to load in information from an excel spreadsheet to the database using a SSIS package, and the package works fine when the spreadsheet doesn’t change.
One of the requirements for this task is to let users add comments on the spreadsheet. There is a column for the comments in the spreadsheet already, so the users just add comments to that column.
When they save the edited spreadsheet and I run the package, the Excel Source complains that the external columns are out of sync, and even more strangely, the number of columns that are shown in the
Mapping is less than the original spreadsheet.
What causes this and how do I fix it so that I can run this package automatically as a scheduled job in SSIS?
try to remove the automatic mapping to columns names.
On the excel source there is an option to select if the first row has columns names. After you configured the mapping, set it to false. It should solve the problem but your transformation will fail now because it will treat the first row as a data row, so either you configure the output error to avoid package failure, or somehow removes the first row from the excel file. You can add a conditional split to do that.
Found the problem: My spreadsheet had a couple of small empty columns at the front. My guess is that when the user saves the information back, these columns get deleted by excel (?) so the columns shifted, causing it to de-sync with the package.
I got this error too and the reason was one sheet does not have the data for some mapping column. Once I deleted that column in excel sheet and then ran. Package successfully ran. I think this will help any of you in feature too.