Share via

Error While Importing Data from Excel

Anonymous
2015-07-08T21:10:36+00:00

I have been importing data from Excel to Access database I have imported without any issue many times before, all of sudden today I am getting this error, some of the record will be lost.

I have checked if I am violating referential integrity rule, primary key duplicates, or data type of the field i am importing does not match table field data type in access.  I did not find any issue with any of the three.

Just to see if the records will be really lost, i copied my database and import the same file in copied database, when warning was displayed i accepted to go ahead anyway.  surprisingly I did not lost any of the record as the warning said, i am not sure what is going on the message being displayed.

Did anyone encounter a similar issue? what has changed since the last time i imported a file, I gone up from Microsoft Office 2010 to 2013. Any suggestions

Thank You

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

5 answers

Sort by: Most helpful
  1. ScottGem 68,810 Reputation points Volunteer Moderator
    2015-07-08T21:57:13+00:00

    What was the exact error message?

    1 person found this answer helpful.
    0 comments No comments
  2. ScottGem 68,810 Reputation points Volunteer Moderator
    2015-07-09T18:31:04+00:00

    Well the Error message is clear, you have values in your import file that would result in duplicate values in constrained fields in the destination table. So you need to look at the table design and see what constraints exist and then look at the data to see what duplications might be occurring.

    0 comments No comments
  3. Anonymous
    2015-07-09T18:01:07+00:00

    Tom,

    As you have mentioned in your response, there might be fields where the character limit might have exceeded the number of characters allowed in the Access field. I have check that, all my fields allow the maximum of 255 characters for the text and data I am importing none of the cells exceed that limit.

    Thank You

    0 comments No comments
  4. Anonymous
    2015-07-09T17:57:17+00:00

    The error message is

    "The contents of fields in 0 record(s) were deleted and 142 record(s) were lost due to key violations."

    just for reference I have attached a screenshot of my table relationship diagram and I am importing the data to TBLINVOICE, primary key values in the records being imported are unique. I have check for them already.

    As I mentioned in my previous post, just for trying sack I did accept the warning to loose record, but when i reviewed the total entries added to the table, none was lost. However, the error claims that 142 will be lost.

    Thank You

    0 comments No comments
  5. Tom van Stiphout 40,201 Reputation points MVP Volunteer Moderator
    2015-07-09T02:56:00+00:00

    Please quote any error messages VERBATIM.

    Reading between the lines I think you may have some truncation. Say you have a text(50) field and Excel has 51 chars in the corresponding field.

    Sometimes it's not easy to see that Excel has more data than you think; for example a cell could have some text followed by a carriage return / linefeed and additional text. The extra text would appear on the second line and not be visible unless you expand the row height.

    0 comments No comments