Link to home
Start Free TrialLog in
Avatar of andi
andiFlag 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?
ASKER CERTIFIED SOLUTION
Avatar of PatHartman
PatHartman
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Offered code sample to identify file type based on extension.