Results 1 to 2 of 2
  1. #1
    Dave Lambert is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Jul 2018
    Posts
    26

    Import an Excel worksheet into Access?

    Hi all!



    How do I import an Excel worksheet into Access when the Access tables have the State defined as Number. The State is a Foreign Key field in 2 Access tables. In Excel it is just the state abbreviations (TX, IA, OH, etc.) The State table is already set up and populated; it has 3 columns: State Key, State Abbr and State Name.

    I would really prefer not to have to manually enter over 1,000 rows of data!

    Thanks in advance!

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    If you want to use Import Wizard, import to a temp table and then build query on that table and States table that converts abbreviation to number and insert those records to data tables.

    Otherwise, use Excel automation to open and manipulate Excel objects in VBA.
    http://www.accessmvp.com/KDSnell/EXCEL_MainPage.htm

    Or do the fix on the worksheet with a VLookup.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 01-31-2016, 06:14 PM
  2. Replies: 7
    Last Post: 09-24-2013, 04:53 AM
  3. Replies: 3
    Last Post: 08-22-2012, 06:28 AM
  4. VBA to Import Excel Worksheet
    By bdaniel in forum Programming
    Replies: 2
    Last Post: 11-23-2010, 10:53 AM
  5. Replies: 1
    Last Post: 11-21-2010, 10:26 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums