Results 1 to 2 of 2
  1. #1
    Innerv1sion is offline Novice
    Windows 10 Access 2016
    Join Date
    Feb 2017
    Posts
    1

    Automatically import Excels

    Greetings, I was wondering if the following is possible using MS Access:


    Creating a folder with various Excels in them, all build up in the same manner (column names and such). Is it possible to create a Access Database that imports all these Excels using the correct header automatically? Ideally, when I insert a new Excel with the same template and I start Access it should import the new Excel to keep the database up to date.
    Thank you for your help!

  2. #2
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,933
    yes it is possible.

    using the dir function you can loop through the files in a directory

    something like

    Code:
    dim fname as string
    fname=dir("C:\xlfolder\*.xlsx")
    while fname<>""
        transferspreadsheet....or other alternatives
        fname=dir()
    wend
    see this link about the dir function - you may also be able to make use of the attributes parameter as well, although I never have

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

Similar Threads

  1. Replies: 32
    Last Post: 09-15-2015, 06:13 PM
  2. automatically refresh import from file.
    By skan in forum Access
    Replies: 6
    Last Post: 09-08-2014, 11:12 AM
  3. Replies: 19
    Last Post: 08-28-2014, 01:13 AM
  4. Import multiple text files automatically
    By instructorTek in forum Import/Export Data
    Replies: 30
    Last Post: 10-20-2012, 04:50 PM
  5. import excel files into access automatically
    By jstei012 in forum Import/Export Data
    Replies: 1
    Last Post: 12-19-2011, 04:12 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