dbTalk Databases Forums  

Problem reading data from Excel spreadsheet from DTS

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Problem reading data from Excel spreadsheet from DTS in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
JeffC
 
Posts: n/a

Default Problem reading data from Excel spreadsheet from DTS - 02-24-2005 , 11:03 AM






I've been using DTS to import data from Excel into a database (both SQLServer
and Oracle). I've run across a problem recently in a couple of different
spreadsheets where a cell that has data in it is being read as NULL from DTS.
This happens both when I write a SQL query for the source, or just specify
the whole sheet. The data in the cell is always numeric when this happens,
but there is usually other numeric data in the same column that comes out
fine. Alphanumeric data in the same column always comes out fine. If I
create another column and use =TEXT(cell,"#"), that normally provides the
correct data, but some values of alpha data aren't properly handled in this
case (e.g. '15E10' becomes '150000000000' which is not what I want to
happen). Setting the format of the cell makes no difference.

Has anyone else seen this? Known bug? Where fixed?


Reply With Quote
  #2  
Old   
JeffC
 
Posts: n/a

Default RE: Problem reading data from Excel spreadsheet from DTS - 02-24-2005 , 11:29 AM






I found this reference in another post (that wouldn't open when I first tried):

Excel Inserts Null Values
(http://www.sqldts.com/default.aspx?254)

This seems to have fixed my problem, but doesn't explain why some rows with
numeric data (after row 8) worked, and others didn't.

"JeffC" wrote:

Quote:
I've been using DTS to import data from Excel into a database (both SQLServer
and Oracle). I've run across a problem recently in a couple of different
spreadsheets where a cell that has data in it is being read as NULL from DTS.
This happens both when I write a SQL query for the source, or just specify
the whole sheet. The data in the cell is always numeric when this happens,
but there is usually other numeric data in the same column that comes out
fine. Alphanumeric data in the same column always comes out fine. If I
create another column and use =TEXT(cell,"#"), that normally provides the
correct data, but some values of alpha data aren't properly handled in this
case (e.g. '15E10' becomes '150000000000' which is not what I want to
happen). Setting the format of the cell makes no difference.

Has anyone else seen this? Known bug? Where fixed?


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.