I'm having an issue importing data from an excel spreadsheet using both SSIS packages and manually through OpenDataSource in T-SQL. The spreadsheet comes from a third party data provider that we use to assist our customers in getting the right data so I can't change the setup of the spreadsheet.
In one column that is defined as a text column there is values representing manufacturing part codes such as this:
9420000073
9420000073
0305DC0161N
0503CA0030N
Using both methods (SSIS, OpenDataSet) the first two values from the above example return a null to the database while the next two are represented correctly. Any value in the column that is entirely numeric is returned as null.
I've tried tinkering with the registry per information from
this article - set the TypeGuessRows to 0, include IMEX=1 in the connection string and so forth.
The best I can get is to have the data source return the numeric columns in scientific notation - eg 9.42e+009 which is useless to me.
Has anyone else had similar experiences and can point me in the right direction so I can get this bloody thing to import the data correctly?
The guts of what I'm doing with the OpenDataSource statement is:
SELECT *
FROM OpenDataSource( 'Microsoft.Jet.OLEDB.4.0',
'Data Source="\\Server\Files\Data.xls";
User ID=;Password=;Extended properties="Excel 8.0"')..."Parts$"