Page 1 of 1

csv column format

Posted: Tue Jan 07, 2003 10:04 pm
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

Re: csv column format

Posted: Tue Jan 07, 2003 11:52 pm
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

Re: csv column format

Posted: Wed Jan 08, 2003 2:07 pm
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.