TechWhirl (TECHWR-L) is a resource for technical writing and technical communications professionals of all experience levels and in all industries to share their experiences and acquire information.
For two decades, technical communicators have turned to TechWhirl to ask and answer questions about the always-changing world of technical communications, such as tools, skills, career paths, methodologies, and emerging industries. The TechWhirl Archives and magazine, created for, by and about technical writers, offer a wealth of knowledge to everyone with an interest in any aspect of technical communications.
Subject:RE: Converting text into tables From:jsmith -at- informatica -dot- com To:PHanson -at- Quintrex -dot- com, techwr-l -at- lists -dot- raycomm -dot- com Date:Tue, 12 Sep 2000 12:15:02 -0700
Paul Hanson asked:
> I have a text file of a directory that is 42 pages long. The following
> is a sample of the data I'm working with:
> NAME DESCRIPTION LAST
> REVISION DOCUMENT TYPE
> 000#0001 Standard HELP Phrases
> 01/04/95 FFTAS400
> I'm familiar with converting text to tables using Word if you have a
> separator, but in this case, there is nothing to separate the columns.
> Is there a way to take this information and put it into Word with the
> above four columns and to add a fifth column for a date formatted as
> 09/12/2000. I need this column so I can sort by it. I tried
> copying and
> pasting my .txt file into Excel, but it put everything in one column
> (A). I'm trying to avoid manual manipulation, but that's the way I'm
What I usually do when I have text files like this is somehow find an easy
way to replace the multiple spaces with tabs (which I then use as my
separator for creating a table). I've done this in two different ways:
1) Use Find and Replace to replace multiple spaces with a tab.
2) Use a user-defined macro to put in tabs
If you have some sort of consistent usage at the beginning of each "field,"
then you might be able to use Find and Replace. Although from the data you
displayed above, I'm not so sure you do. For example, I had a text file that
was formatted with spaces, but everything in the second column started with
"HIDD". I was able to replace " HIDD" with "<tab>HIDD".
For your data, you might need to create a user-defined macro. That solution
will be more tricky. Unfortunately, I'm only able to make simple macros!
=} I defer to a macro expert to help you out there...
jsmith -at- informatica -dot- com