1

Looking for a mode to edit CSV files. I tried csv-mode which is great for viewing CSVs via the minor mode csv-align-mode.

However I cannot find an easy way to add or delete columns in this mode. Is this possible in csv-mode or is there another mode for CSV files allowing this?

halloleo
  • 1,215
  • 9
  • 23
  • There are [several spreadsheet packages](https://www.emacswiki.org/emacs/SpreadSheet) available; [table-mode](http://table.sourceforge.net/) might be of interest; and you can use the [general rectangle commands](https://www.gnu.org/software/emacs/manual/html_node/emacs/Rectangles.html) to insert columns. In general I just reach for another tool when I need to do serious work with "csv" files – nega Mar 11 '22 at 15:38
  • @nega Thx for chiming in. In the spreadsheet packages I couldn’t find one that operates on CSV file buffers. Creative idea to use the rectangle commands - will try whether it works with a Csv file in csv-align-mode. :-) – halloleo Mar 12 '22 at 00:03
  • If you want to filter rows, none of the packages can help.I was also looking for one a few years ago. Have not found any yet – Prasanna Mar 12 '22 at 05:42
  • @nega The rectangle commands work perfectly in csv-align-mode! Would you like to write up an answer for this? – halloleo Mar 16 '22 at 03:36

1 Answers1

0

You can use csv-insert-column to add a column, and with the whole buffer selected csv-kill-fields will delete columns.

Leinster
  • 101
  • 1