Solved

SSIS Excel Import conversion error

Posted on 2014-10-08
8
459 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
  • 3
  • 3
  • 2
8 Comments
 
LVL 49

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
How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

 

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 49

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

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

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

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
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.

726 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