Discussion Locked

IMPORT & FORMAT OF TEXT FILES

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
HOW DO I AUTOMATE TEXT FILE IMPORTING AND FORMATTING IN MS-EXCEL OR MS-ACCESS. I TEND TO GET TIRED MANUALLY DROPPING OR PROPERLY SPACING DATA.

5 replies

by mtnsqs

How are your test file sbeing generated?? If they are generated by another packeage then try to use a CSV (comma separated format)and save as .csv then Excel will read it in easily and automatically.

by shanghai sam

The text files or reports I use are system generated with a .PRT extension which I format and represent according to user specifications. The system has a report writer which allows for specific file output. But thanks, I'll try renaming the latter reports with a .csv extension, and come up with VB code to read the file and format properly.

Any other ideas would be most appreciated.

by miss kitty

In Access you can write a macro to import your text file in and use a specification to assign what fields are what type. To set up a specification:
1. When you import a file, before you click on finish, click on advanced.
2. Set your fields to the format you want to import them to.
3. Save your specification.
You can set your macro to open when you open the database and this should take care of you
having to manipulate the format in ACCESS.
Good Luck

This discussion is closed to new replies.