Skip to content

Make Reformat keep the quotes as-is like in the original file #57

@artyb55

Description

@artyb55

Hi,
Thank you for working on this plugin for Notepad++.

I'm trying to edit CSV files that aren’t compliant with RFC 4180 CSV rules, and I can’t change their format. They have some rows of differing lengths, and some fields are enclosed in quotes even though they don’t strictly have to be according to the standard. The files also have 4 header rows. I’ve been searching for an editor that will allow me to move some text to the right (by adding extra delimiters) so that info in the header is kept when I delete columns, and then align the delimiters so I can delete some columns, WITHOUT changing the formatting of the CSV file. I don’t know that behaviour could be added as options to this plugin?

I’ve tried LOTS of editors and only found one commercial piece of software that does what I need. I've been surprised how difficult it's been to find a way of doing this-spreadsheets mangle the quotes, and I can't find a text editor that will properly align the delimiters and keep the quotes.

What I'm doing is importing the file (which doesn't natively have a .csv extension). I'm then using the manual 'Detect Columns' to specify the delimiter. Ideally the plugin would be smart enough to not detect delimiters within quotes.

My next step is to use the 'Reformat' and 'Align vertically' options, at which point all the quote characters are removed from the file. None of the 'Re-apply quotes' options put them back everywhere they were. An option to not remove any quotes would be great.
Datalogger files often have more than one line of headers as they store other info on the configuration. These files have 4 lines of headers, and the 'Align vertically' doesn't add enough space to all rows that they are properly aligned. #46 may relate to this (Autodetection of columns not working for more-than-one-row header).

Here's a screenshot showing the removal of quotes and vertical alignment issues:
2023-03-31 10_23_32-CSV_Editors_CSV_Lint_inNotepad++_AlignmentIssues

What I'd hoped to do as the final steps was to use Notepad++'s multi-row editing to delete columns (although I see there is an enhancement to allow that in CSV-lint #54).

Last step was to be to remove the 'Align vertical', and save the modified file.

I've attached a sample file, and what I'd like it to look like after editing (these both have the file extension changed to .csv so I can upload them here.

BW,
A

CSV_Lint_inNotepad++_ExampleDataFile__2023_02_28AB1.csv

CSV_Lint_inNotepad++_ExampleDataFile_Edited__2023_03_30AB1.csv

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions