Solved

excel file Import into a DB - Getting NULL Values instead of numeric data

Posted on 2009-05-18
8
905 Views
Last Modified: 2013-11-10
Hi guys,

I am trying to import excel files using FEL -- The data in the file in a particular column is preceded by apostrophe like '5758585858 for few and without an apostrophe for few ...Now the Columns without an ' are coming in as NULL Values.. How to get the original values..

I have tried changing the extended properties as below with no luck..
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" ******** ";Extended Properties="Excel 8.0;IMEX=1;HDR=NO"
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" ******** ";Extended Properties="Excel 8.0;IMEX=1;HDR=YES"

Plz Help
0
Comment
Question by:danny1620
8 Comments
 
LVL 14

Expert Comment

by:Emes
ID: 24415860
this is excel pickyness.  Try to make the column a varchar and see what happens.

Not sure if this is the issue or not but it may be having trouble with ints and chars.

Try to also make it one field and make it work for that.  Then expand the data slowly so you can see any problems

0
 

Author Comment

by:danny1620
ID: 24416850
I did not get you.. But @ present the column is a Varchar
0
 
LVL 22

Expert Comment

by:PedroCGD
ID: 24419989
Danny,
I think I was some time ago with a similar problem... could yo attach here a sample file?
Regards,
Pedro
www.pedrocgd.blogspot.com
0
 

Author Comment

by:danny1620
ID: 24422514
Hi Pedro...
I have atached the sample file.. I am concerned about the Corrected column and the Site Column.. As you see the corrected column has values as both text and number format .... I can change the Extended properties to get either the number or Text  ...but not both

Sample.xls
0
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 

Accepted Solution

by:
danny1620 earned 0 total points
ID: 24498265
Hi

Below change in the Properties Worked for me

"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" ******** ";Extended Properties="Excel 8.0;IMEX=1;HDR=YES"

Thanks All
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 24499077
<quote>
I have tried changing the extended properties as below with no luck..
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" ******** ";Extended Properties="Excel 8.0;IMEX=1;HDR=NO"
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" ******** ";Extended Properties="Excel 8.0;IMEX=1;HDR=YES"
...
Below change in the Properties Worked for me

"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" ******** ";Extended Properties="Excel 8.0;IMEX=1;HDR=YES"
</quote

:(
0
 

Author Comment

by:danny1620
ID: 24499906
I dont know why it did not work for the first time ... But did again..
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 24502450
I knew it worked, but you had stated it did for you, that is why I saw no point in contributing.

It is covered in this article on DTS (but the same applies to SSIS):
Excel Inserts Null Values
http://www.sqldts.com/254.aspx
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
Viewers will learn how the fundamental information of how to create a table.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

705 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now