DTS - import from excel ended with more records

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • thesti
    New Member
    • Nov 2007
    • 144

    DTS - import from excel ended with more records

    hello,

    i've just tried importing data from an excel file to a table in SQL Server 2000. there are only 887 rows in the excel file, but after the import process. and i select * from the Dest_Table. i see there are 2341 records.

    and also for this, i have to remove the primary key constraint from the table, because if not, there will be errors telling the primary filed cannot be null. there's no empty/null value in the excel file.

    why can this happen?

    Thank you.
  • Delerna
    Recognized Expert Top Contributor
    • Jan 2008
    • 1134

    #2
    This can happen if your excel document has a lot of blank rows following the rows that actually have data in them.
    You can tell by the vertical scroll bar on the worksheet. It will scroll way past the rows that actually have data.

    2 Fixes
    1) Highlight all the empty rows in the worksheet and delete them.
    Save the document and then check the scroll bar. It should only scroll to the end of the rows with data.
    2)Change your DTS so that it excludes blank rows

    Comment

    Working...