Importing data from Excel fails -
12-07-2005
, 09:37 AM
Hello all,
I am tryint to import data from Excel into a table in SQL using a DTS
package. I have not had to work with such a strangely formatted Excel file
before, but this is what happens:
Here is the general formatting of the excel file
FieldA FieldB FieldC FieldD
FieldF FieldG FieldH FieldI
Sales for quarter
Sales Redemptions
1234.67 6789.987
004 Growth Fund - CAD Mutual Fund 7.01 0.01 0.14
124,243 7.08 5.29
039 Fund - USD Mutual Fund 6.03 0.04
7 - 6.06 4.32
052 Growth Fund Fund 24.36 0.07 0.29
1,247,047 25.94 18.29
When I click on a destination table and hit Import, it looks at Field G and
H and determines the datatype to be varchar. Then I run the package and it
imports only the strings, but none of the float numbers.
however when I take out this line:
Sales for quarter
Sales Redemptions
1234.67 6789.987
it now looks at fields G and H and assigns them a float datatype. It imports
everything the way I want it to. So I assumed that when it's examining the
excel file, once the package encounters the
string 'Sales' and 'Redemptions' it assumes automatically that this should
be of varchar datatype.
But this is the strange part: I am running this directly on the server. When
I run the same exact thing from my machine's enterprise manager, it doesn't
care it still makes it a float datatype (without me taking out the first two
rows) and imports all float types fine and assigns NULLs to all other
strings.
How come this works on my windows xp enterprise manager but no the Servers
enterprise manager? Is there something on the System tables I have to
change?
Hope I explained this properly.
Thanks
leo |