Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

What is a good way to edit CSV files in Ubuntu?

The files look something like this:

This,is,data,with,a,header
2,2,3,4,,
1,,3,,6,6
,5,3,5,5,6
1,2,,,,
1,2,3,4,8,6
1,,9,,5,9
-1,,3,4,5,6
1,2,0,4,5,6

I've been using OpenOffice, but it takes about 5 clicks to turn off the default behaviour of quoting all of the fields.

I'd like to find something lightweight and easy to use that will allow inserting/deleting data, and column-based sorting.

share|improve this question
add comment

6 Answers

I know what you mean about {Libre,Open}Office. TBH, I never have found anything really good on Linux that is also lightweight.

The "best" (yes, in Ironic quotes) I've found so far is a java app called csveditor It's pretty clean, but doesn't really follow the best UI guidelines.

share|improve this answer
add comment

I wondeer that nobody mentioned vim yet, but there is a nice plugin: http://www.vim.org/scripts/script.php?script_id=2830

share|improve this answer
add comment

Try out Gedit or Notepad++. Both work wonderfully as text editors and they have a lot of built in features.

Check out the many replies to a similar question over at StackOverflow

share|improve this answer
    
These editors treat CSV files as plain text, no? –  Andrew Wood Feb 13 '13 at 19:57
add comment

I saved your example as test.csv and opened it with LibreOffice with no trouble at all:

$ cat test.csv
This,is,data,with,a,header
2,2,3,4,,
1,,3,,6,6
,5,3,5,5,6
1,2,,,,
1,2,3,4,8,6
1,,9,,5,9
-1,,3,4,5,6
1,2,0,4,5,6
$ libreoffice test.csv 

I then got this dialog, and chose "comma" as the separator:

enter image description here

I clicked on OK and got this:

enter image description here

What more do you need?

share|improve this answer
    
The problem I'm having with openoffice is that sometimes the separator options change without notice, and the file gets saved with quote delimiters (OO seems to lack forcing defaults). It happens more when saving a file out rather than loading a file in. –  Andrew Wood Feb 13 '13 at 19:52
    
It's certainly possible with OpenOffice though, you're right. –  Andrew Wood Feb 13 '13 at 19:55
1  
As far as "what more do you need", I've been in @AndrewWood 's situation and generally need less :) I've personally asked this question before. I love LibreOffice. I use it all the time. But sometimes you want a simple CSV editor that doesn't take up a huge chunk of RAM and just stays out of your way. –  Rich Homolka Feb 13 '13 at 21:30
    
@RichHomolka, to tell you the truth, I use gawk :) –  terdon Feb 13 '13 at 22:57
add comment

The java CsvEditors (e.g. csveditor, reCsvEditor) may be worth a look

share|improve this answer
add comment

I use DMcsvEditor. It's fast and lightweight, and has some basic useful options.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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