janisdd / vscode-edit-csv

vs code extension to edit csv files with an excel like table ui
MIT License
221 stars 32 forks source link

Option to allways wrap values in " or other char #169

Open RHasemann opened 2 weeks ago

RHasemann commented 2 weeks ago

Edit cvs 0.10.0

Feature

Please add the option (in Write options?) that field values could always be surrounded with a char, like " or ' for example and don't remove these on empty fields. Because this makes a big difference! If you, for example, use the csv to import data into a database:

... ,, ... means the value is null, whereas ... ,"", ... means the value is an empty string!

Which is a big difference if your db has non-null columns!

Thx!

janisdd commented 1 week ago

Hm, never thought about that. With the text quote all fields, one would assume that all fields would be quoted (empty or not). So I think it would be good to put empty fields in quotes as well.

However, since this changes the current functionality and some users probably want to keep the old behavior, it would be good to add an option.

Essentially: new option Quote empty fields (bool) with default value true