?
Solved

SSIS Excel Import conversion error

Posted on 2014-10-08
8
Medium Priority
?
472 Views
Last Modified: 2016-02-11
Hello Experts Exchange
I have a Excel spreadsheet I'm trying to import in to SQL Server using SSIS wizard.

I have several columns all are fine apart from one, where SSIS see the field as a Double field, its not its a text field.

I opened the Excel file selected the column and used Text to columns to set the field to text, this normally works for me but at the moment it does not solve the problem.

If I was to save the package and open it up in Microsoft Visual Studio, is there a way I can get this column in, in its text format?

Regards

SQLSearcher
0
Comment
Question by:SQLSearcher
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
8 Comments
 
LVL 51

Expert Comment

by:Vitor Montalvão
ID: 40368613
What's the error returned by SSIS?
0
 

Author Comment

by:SQLSearcher
ID: 40368679
Hello
There is no error message, either it imports and where I have data its sets it to null, or I set the datatype of the database table and then the SSIS wizard will only let me save the package.

Regards

SQLSearcher
0
 
LVL 14

Expert Comment

by:Christopher Gordon
ID: 40368710
Is it possible to save the Excel file as a tab delimited or csv file?  SSIS and Excel make "guesses" on the data type of your columns that are often incorrect.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:SQLSearcher
ID: 40370161
Hello
I have several Excel sheets I need to import so I would like to be able to import from the Excel spreadsheets.

I have found a web page that gives me a solution to my problem, but now I have a new error.

Web site;
http://blog.concentra.co.uk/2013/05/15/why-ssis-always-gets-excel-data-types-wrong-and-how-to-fix-it/

New Error;
[Source - H4$ [49]] Warning: The external columns for Source - H4$ are out of synchronization with the data source columns. The external column "Part Number" needs to be updated.
The external column "Level 1" needs to be updated.
The external column "Level 2" needs to be updated.
The external column "Level 3" needs to be updated.
The external column "Problem" needs to be updated.



I have check the source data types for the problem fields and it is Unicode string [DT_WSTR], but the data will not import.

Can anyone help me please?

Regards

SQLSearcher
0
 
LVL 51

Expert Comment

by:Vitor Montalvão
ID: 40370177
Usually the last rows and columns are empty. If is the case, try to delete the empty columns and rows and run the import wizard again.
0
 

Author Comment

by:SQLSearcher
ID: 40370245
Hello
I have deleted the empty rows that did not work.

Regards

SQLSearcher
0
 
LVL 14

Accepted Solution

by:
Christopher Gordon earned 2000 total points
ID: 40370415
The issue is with the SSIS metadata.

Delete your destination task.

Right Click on your Source Task and click Edit.

Click on the "Columns" option in right hand tree view.  Make no changes and hit "OK".  You may get a message, hit "OK".

Put your Destination Task back on the canvas, reconfigure, and wire it back up to your source task.

This should refresh the metadata.
0
 
LVL 14

Expert Comment

by:Christopher Gordon
ID: 40370419
Ah, my previous comment assumes you're doing this in visual studio.  You can ignore if your doing this via wizard.  Sorry for the confusion.
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question