Results 1 to 5 of 5
  1. #1
    raytackettsells is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2012
    Posts
    27

    Import all files


    Is there a way to import all excel spreadsheets from a specified path. for example, i have 20 spreadsheets in one path c:\documents\ftp and want to include all of the spreadsheets in that location.

    Thanks in advance for the help!

    Raymond

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,928
    Yes, VBA could do this. The exact nature of the code depends on the structure of the spreadsheets. If the structure is simple enough maybe just TransferSpreadsheet method will serve. So code would loop through the folder and get each Excel file and do import procedure.

    You have already been referred to code for getting files in a folder. Inside the loop to get files have code to import the data. Review: http://forums.aspfree.com/microsoft-...el-413629.html
    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.

  3. #3
    raytackettsells is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2012
    Posts
    27
    I am actually glad I took the time because this worked fairly seamlessly except i didnt realize it pulled everything in so when i deleted it out of the database everything was gone in the destination folder! thank god for terabyte external backup drives Now i will put a post in the forum or search first on how to just show the duplicates in the table. maybe a simple query will do this. thanks!

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,928
    Can do an aggregate (GROUP BY) query that counts the values that should be unique. This should expose duplicates.
    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.

  5. #5
    raytackettsells is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2012
    Posts
    27
    Quote Originally Posted by June7 View Post
    Can do an aggregate (GROUP BY) query that counts the values that should be unique. This should expose duplicates.
    it worked! thanks for the resolution!

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

Similar Threads

  1. Import excel files
    By Jim.H. in forum Import/Export Data
    Replies: 1
    Last Post: 02-21-2012, 06:03 PM
  2. Import only Files not already imported
    By Rhino373 in forum Programming
    Replies: 1
    Last Post: 05-04-2011, 03:28 PM
  3. How to import a mass set of xls files
    By pkstormy in forum Code Repository
    Replies: 0
    Last Post: 11-24-2010, 06:25 PM
  4. Import Text Files without access
    By 95DSM in forum Import/Export Data
    Replies: 1
    Last Post: 09-10-2010, 04:36 PM
  5. Import HTML files into access
    By mccrimmon in forum Programming
    Replies: 0
    Last Post: 02-15-2010, 03:40 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