General questions about using TextPad
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
-
g00ber
- Posts: 10
- Joined: Fri Jul 11, 2003 8:01 pm
Post
by g00ber »
Hi,
Is there any macro that can line up delimited data for easier viewing? Excel import is too cumbersome.
Ex: Orginal File
Code: Select all
PET,FRUIT,COLOR,SHAPE
Dog,Lemon,Red,Triangle
Cat,Lime,Blue,Circle
Bird,Orange,Yellow,Square
Desired Output
Code: Select all
PET ,FRUIT ,COLOR ,SHAPE
Dog ,Lemon ,Red ,Triangle
Cat ,Lime ,Blue ,Circle
Bird ,Orange ,Yellow ,Square
-
ak47wong
- Posts: 703
- Joined: Tue Aug 12, 2003 9:37 am
- Location: Sydney, Australia
Post
by ak47wong »
You can insert tab characters before each comma with the Replace command:
Find what: ,
Replace with: \t,
Select Regular expression.
Click Replace All.
When you want to restore the original text, delete the tabs:
Find what: \t
Replace with: (nothing)
-
g00ber
- Posts: 10
- Joined: Fri Jul 11, 2003 8:01 pm
Post
by g00ber »
I would prefer something where it takes the biggest data in the column and use that as the "column-width".
Replacing commas with tabs doesn't really line it up if one of data is "big" and others are "small".
-
ak47wong
- Posts: 703
- Joined: Tue Aug 12, 2003 9:37 am
- Location: Sydney, Australia
Post
by ak47wong »
You can click View > Document Properties and change the width of the tabs, or define custom tab stops, on the Tabulation tab.