Avatar of andi
andi
Flag for United States of America asked on

Access: Importing Multiple Text Files with Unknown Specs or Delim/Fixed Width

I am looking for some help in the following case. I have various text files to import into an Access db but the files are not consistent. Some are pipe delimited while others are fixed width. The end goal is to import one field the account field. What i am looking to do is, while looping through the text files to choose the proper Specification, generally it is 1 of 3 specs and/or if Pipe Delimited or Fixed Width.

Currently, the workaround is to import each file in the directory three times and then to delete the tables that are empty or less than the 8 char account record.

Any help is appreciated.


Or if anything a solution to choose spec based on file name?
VBAMicrosoft Access* importing* text file

Avatar of undefined
Last Comment
PatHartman

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
PatHartman

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
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.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
PatHartman

Offered code sample to identify file type based on extension.
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy