Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2010
    Location
    Atlanta, GA
    Posts
    211
    Provided Answers: 1

    Unanswered: Why is DoCmd.TransferSpreadsheet causing Excel Import Errors?

    Using office 2010.

    I am trying to import excel data into an existing table but after the import, access generates a table of import errors. The erroring rows are failing due to "Type Conversion Failure". Normally this is an obvious fix but I can't figure out why Access is throwing these errors.

    The fields in question may contain data that looks like numbers or data that is text. When I manually import the spreadsheet, it defaults to "Double", and I manually change it to "Text", and then it import fine with no errors. I confirmed that the table definition shows "Text" as well. But when I use DoCmd.TransferSpreadsheet, using the same file into the now existing table, I get a list of "Type Conversion Failure" import errors for the fields that contained text. in other words, it is acting like it is trying to import the file with the default field datatypes instead of looking at the table into which it is importing.

    What's even more strange, is if i do a manual import and tell it to ignore this problem column altogether, it still generates the error list even though that column was never imported!

    What is going on here? Is there a way to fix this issue?
    Last edited by clawlan; 10-23-14 at 13:18.

  2. #2
    Join Date
    Oct 2010
    Location
    Atlanta, GA
    Posts
    211
    Provided Answers: 1
    Totally posted this in the wrong forum, sorry. Admins, can you move you Access forum?

  3. #3
    Join Date
    Jan 2003
    Location
    Minneapolis
    Posts
    58
    While the move is pending, you could look into DoCmd.TransferText. What you would do is create an import specification defining the data types up front and trying to force it that way when you do the TransferText call.

  4. #4
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Quote Originally Posted by clawlan View Post
    Totally posted this in the wrong forum, sorry. Admins, can you move you Access forum?
    Thread moved as requested.

    -PatP
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

Posting Permissions

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