Solved

SSIS Excel Import conversion error

Posted on 2014-10-08
8
467 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 50

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
Technology Partners: 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 50

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 500 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

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

717 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