I\'m trying to import a spreadsheet to our database using SSIS. For some reason SSIS wants to believe two of the columns are of type Double, when they contain character dat
I had the same problem. The problem sit in the Excel Source task. When you setup this task the first time, the task will connect to the specified Excel file (via the Excel connection) and decide what type each column is based on the current spreadsheet.
Thus, if you set up the Excel Source task, just make sure that the columns that should be text only has text in the column. This means that the Excel Source task will always assume that any subsequent spreadsheets will have the same format and will read 12345 as text because the column was text when the task was set up.
Hope it makes sense!
This worked for me. Select the problematic column in Excel - highlight the whole column. Change the format to "Text". Save the Excel file.
In your SSIS package, go to the Data Flow pane for your import. Double click the Excel Source node. It should warn you that the types have changed and ask you if you want to remap them. Click Yes. Executing should now work and bring in all values.
Note: I'm using Excel 2013 and Visual Studio 2015, but I assume these instructions would work for earlier versions too.
;IMEX=1; is not always working... Everything about mixed datatypes in Excel: Mixed data types in Excel column
I've used the following recipe:
and it worked for me...
One thing that isn't mentioned in the accepted answer is that the "IMEX=1" parameter has to go inside the quoted portion of:
...;Extended Properties="...";
You can also alter the registry to look at more values than just the first 8 rows. I have used this method and works quite well.
http://support.microsoft.com/kb/281517