Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2002
    Location
    Singapore
    Posts
    71

    Unanswered: Importing Excel Into MS SQL Table

    Hi.

    I have done this successfully the last time but just couldn't get it to work this time round. Please help.

    I was trying to import data from an Excel file into MS SQL table. NONE of the numeric or value fields (right justified) works because they shown <NULL> in MS SQL table after the import via DTS. Those string fields were able to import ok into the table. DTS didn't show any error message during the DTS run.

    Any advise? Thank you.


    Best regards
    Teck Boon

  2. #2
    Join Date
    Jul 2003
    Posts
    123
    Do the values in the cells in the Excel-sheet have a ' in front of them?

    This character tells Excel that it should leave the value in the cell alone, and when they are imported they are considered to be text.

  3. #3
    Join Date
    Jun 2002
    Location
    Singapore
    Posts
    71
    Hello oneleg_theone.

    Thanks for your email reply. There isn't a ' in the cell. The problem was there were many other unwanted text at some point in the file. After removing them, I saved the file as a .csv file everything works. I was able to import into my SQL table using DTS.

    Best regards
    Teck Boon

  4. #4
    Join Date
    Nov 2004
    Posts
    128
    I don't know if this applies to this situation or not, but wanted to throw it out there as an FYI. Using DTS to import Excel, DTS will look at the first 8 rows (I think it's 8 rows anyways) of Excel data to look for certain characteristics, and base how it will do the import on that. I know that number can be changed, possibly even ignored. However, it's been several years since Ive had to deal with this, so my apologies for not being able to recall how to go about it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •