40

Is there a way in Notepad++ to convert a comma-separated file to fixed width columns?

This feature exists in UltraEdit and explained in Working with CSV files, but I am happy with my Notepad++, and I don't want to pay for a copy of UltraEdit.

48

Use the built in TextFX menu.

TextFX -> TextFX Edit -> Line up multiple lines by (,)

I didn't discover this on my own, I found it on sourceforge while trying to figure out this exact question!

  • 2
    Nice but "Out of memory" for 15k rows. – watbywbarif Feb 9 '15 at 15:38
  • 1
    also it adds spaces to the file :-( – Radek Jul 15 '15 at 0:23
  • 1
    Radek if you want to split line, there is a feature just above in the menu called "split lines at..." – JinSnow Aug 10 '15 at 19:13
  • 4
    Note that as of Notepad++ v7, you have to install the TextFx Characters plugin using Plugin Manager. – E-Riz Oct 13 '16 at 20:33
  • 1
    TextFX doesn't seem to be available for NPP 64bit – DaveInCaz Aug 28 '18 at 15:06
9

In the meantime I have just found a very nice tool for that. It's called CSVed and available here, with many many nice features. If you hate Excel when viewing CSV files like I do, you should give it a try.

0

Yes, it's possible in Notepad: menu Edit -> Replace... -> ReplaceAll ',' by '\t'.

  • 6
    -1. Converting it into a TAB separated format does not make it a fixed width column format. – Peter Mortensen Feb 15 '14 at 18:50
  • 3
    Literally using "\t" does not work, neither in Notepad or Notepad++. It is always a challenge to use a TAB character in a dialog. A common work-around is to enter a TAB character in a document, put it into the clipboard by a cut (Ctrl + X) and pasting it into the field in the replace dialog. – Peter Mortensen Feb 15 '14 at 18:55
  • 2
    OK, in Notepad++, selecting the option "Extended (\n, \r, \t, \0, \x)" makes it work. – Peter Mortensen Feb 15 '14 at 19:09
  • TextFX -> TextFX Edit -> "split lines at..." – JinSnow Aug 10 '15 at 19:15
  • 1
    @PeterMortensen It doesn't work unless your tab size is longer than (length of longest entry in column) - (length of shortest in column). E.g., if your tab size is 4, your longest line is 20, and your shortest line is 5. That, a very common use case, will still result in an uneven file. – jpmc26 Aug 10 '16 at 0:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.