csv column format

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
jdlord

csv column format

Post by jdlord »

I have a csv file with different width colum headers and data. I'd like to format the file so that the data lines up. Is this possible in textpad? I have 300 or so columns so I can't use excel.

For example:
Current data:

column1,column2,column3
1,ksdafksdjfkksajkjasdkfjskd,3

I would like to see:
column1,column2 ,column3
1 ,ksdafksdjfkksajkjasdkfjskd,3
Stephan

Re: csv column format

Post by Stephan »

Jeff,

did your formatting make it into the forum?

Anyway, I'd guess that you' trying to format each line, so that the widest entry in each column contols the column width (eg. col width = widest entry + 2 spaces on each side or something alike?).

I'm not sure whether TextPad can do this for you, but I know that almost any (so called) scripting language can do this.

Drop me a line (to Stephan dot Kaemper at Schleswig-Holstein dot de) if I may help you with that.

Best wishes & a happy new year

Stephan
Andreas

Re: csv column format

Post by Andreas »

If you want to view such file(s) more than one time, create a document class for it.
replace your commata by tabs

then go to
Configure/Preferences/Document Classes/Your Document class/Tabulation

now set your tab stops as you like/need them - either equidistant or at whatever positions you want them.
Post Reply