Link to home
Start Free TrialLog in
Avatar of Shyretta Jenkins
Shyretta Jenkins

asked on

Importing from Excel to Access

Hi, I am trying to import from excel to access. I have executed this process for over 10 years and now since I have upgraded to Access 2016 it is giving me issues. I have a Excel spreadsheet when all the information is imported however, the data that I have in my "AdminComments" field is not. Once I have imported there is a table within Access 2016 created that has Datatype Conversion Failire for this particular column.

I made sure the data in the excel spreadsheet is text but it still isnt working. I am using Longtext because the text can be lengthy.
Avatar of Scott McDaniel (EE MVE )
Scott McDaniel (EE MVE )
Flag of United States of America image

Have you tried linking the table instead? Often that's a better solution than an Import. If you need to persist the data locally, you can still link the Excel file, and then run code to save the linked data to an Access table. Doing this also gives you a chance to validate and verify information before it's imported.
Avatar of crystal (strive4peace) - Microsoft MVP, Access
crystal (strive4peace) - Microsoft MVP, Access

instead of creating a table by importing, create the structure first and then import into it by appending. If you do create by importing, it is a good idea to put a dummy row first that will be deleted after importing that has an example value in every field. Not sure, however, a table created by importing will choose Long Text if dummy text is more than 255 chars.  Other problems with import table definitions include format code for text fields that will truncate to 255 (remove this after import, along with other field properties you don't really want).  In table, put an autonumber ID field last since it will not be in your data and is a good idea to have.
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.