Tabulating Tool.
Posted: Wed Jan 10, 2001 3:55 am
I need to sort columns of varying string-lengths and string-count in many lines, in files that have no tabulation. If I could sort them into clear columns, the block edit function of TextPad would make easy work of extracting lists of numbers to a spreadsheet, for instance...
I have worked out a simple method for the process I need:
1. Examine lines, looking for spaces.
2. Set first tab point 'n' spaces longer than longest first string found any line.
3. Insert sufficient spaces to align the remainder of each line to the tab point.
4. Repeat the process from (2.) for each subsequent space found in the lines, until no more are found.
What I cannot figure out, despite dizzying my head with a good read of some of this forum, is how to implement it!
Can anyone advise me on this, please?
I have worked out a simple method for the process I need:
1. Examine lines, looking for spaces.
2. Set first tab point 'n' spaces longer than longest first string found any line.
3. Insert sufficient spaces to align the remainder of each line to the tab point.
4. Repeat the process from (2.) for each subsequent space found in the lines, until no more are found.
What I cannot figure out, despite dizzying my head with a good read of some of this forum, is how to implement it!
Can anyone advise me on this, please?