locked
Numeric Strings Will Not Import From Excel RRS feed

  • Question

  • Hello,
    I have a table in SQL Server 2005 that has an NVarchar(50) column called AcctCode. I am trying to populate this column from an Excel source. I am doing this from the Import/Export Wizrds in Management Studio. When I attempt the import from the Excel file, all the the AcctCode data that is alpha numeric or just alpha will import, but the all numeric data comes in as NULL.

    If I make AcctCode NOT NULL, I get an integrity contraint error from the wizard. The rest of the records import. I've tried to make the column in the Excel file type 'text', and have tried it with no formatting on this column.

    Why won't the all numeric Acctcodes import?

    Thank you for your help!

    cdun2
    Friday, September 28, 2007 6:33 PM

Answers

  • In the Excel connection properties, you need to add "IMEX=1" to the extended properties list.  You can search this forum for examples and other threads on this topic.
    Friday, September 28, 2007 6:43 PM

All replies

  • In the Excel connection properties, you need to add "IMEX=1" to the extended properties list.  You can search this forum for examples and other threads on this topic.
    Friday, September 28, 2007 6:43 PM
  • Thanks! I will research this more, and try it.

     

    cdun2

     

    Friday, September 28, 2007 7:09 PM