Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hi, I am having a problem with a text file that I am trying to import into Access.
The file is on a CD from one of our vendors that we load into a mainframe. I am trying to take this data and put it in an access database for a separate purpose. I contacted the vendor and they said that it could be done, just that they don't support the process to bring the data to Access.
What I was hoping to do was open the file in access (or excel) and parce the columns when prompted (like everytime you open a text file in excel). However what I found out was that the text was formatted "all on one line". The finished product would have multiple columns with thousands of records.
Onto my question, is there any way to take the text file and insert a return so that the data will line up in columns? I don't know if there are text editors out there that support macros, but I counted and I need some sort of macro or something to enter a return after every 64 characters and that will put my data in columns and make it ready for further processing in Access.
Any help????

You can probaly write a short VB routine that will do this.
I'm not a programmer, but if I remember correctly, it has something to do with the Right String syntax.
I bet some one in the Programming forum could do this for you in a a flash.
Larry

If you brought it to Excel and all you needed was the returns after every 64 characters, you try something like =MID($A$1,1+64*(ROW()-2),64). This assumes you brought the original information into A1, and put this formula in A2 thru however many "records" you needed (A3000?). Then if every field of the record is the same length, use the Data, Text to columns feature to break out the individual fields.
Judging by the date of the posts, this is probably a little late, but maybe worth a try if haven't found anything better yet.

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |