abe33 / atom-tablr

Edit CSV files using a table editor
MIT License
164 stars 44 forks source link

Failure to open csv containing columns with embedded quotes #18

Closed pamtbaau closed 8 years ago

pamtbaau commented 8 years ago

The csv-configuration screen gives an error when quotes are embedded and opening is blocked.

"2015-11-26","An account with a "quoted" name","231.50"

abe33 commented 8 years ago

It looks like a known issue in csv (the underlying node module I use to parse CSV): https://github.com/wdavidw/node-csv/issues/20 But the issue is quite old and didn't much evolved since then.

I'll take a look to see how hard it'll be to implement a fix, but even then, there's no guarantee that the fix will be available any time soon.

If you have a few occurrences like this it would probably be best to use proper escaping for double quotes (double double-quotes by default).

I'll be curious to know which software generated this file, because it's been a while since I had an "invalid" CSV file out of an app.

pamtbaau commented 8 years ago

I tried to open a csv download from my bank. A few memo/description fields contained company names with double quotes which were not properly escaped in the download.

I had to deal with it myself when I wrote a Python app to convert downloaded transactions into OFX format for uploading into Money or GNUcash

The failing transactions are before 2006 though... It's probably not with worth investing any time in it.