BdR76 / CSVLint

CSV Lint plug-in for Notepad++ for syntax highlighting, csv validation, automatic column and datatype detecting, fixed width datasets, change datetime format, decimal separator, sort data, count unique values, convert to xml, json, sql etc. A plugin for data cleaning and working with messy data files.
GNU General Public License v3.0
161 stars 10 forks source link

How to work with text selection? #60

Closed Pierre-de-la-Verre closed 1 year ago

Pierre-de-la-Verre commented 1 year ago

It seems that the commands (analyse, reformat, .) are always using the entire file. Is it possible to reduce the functions to seekcted text only?

BdR76 commented 1 year ago

When working with a csv data file, usually the entire file is one dataset, and you always want to work with the file as a whole. So no, that's not supported by the plug-in. In what situation would you only like to apply it to part of the file?

You could select the part you want to edit, copy it to a separate tab (ctrl+N then ctrl+V), then auto-detect the columns and analyse or reformat only that part of the csv dataset.

Btw the development version does support SkipLines feature, where you can tell the plugin to always skip the first X lines, see issue #46

Pierre-de-la-Verre commented 1 year ago

... In what situation would you only like to apply it to part of the file?

I have the (rare) situation that some files are a mixture of text-files (partially fixed width formatted) and sections with CSV data. But the workaround to copy&paste the relevant parts is OK too..

BdR76 commented 1 year ago

A mixture of both fixed width data and csv data, I wonder which system exports data in that way, because I doubt any general data processing app or program will support something like that, other than writing a custom Python script maybe.

However, maybe your case is actually that the data is sandwiched between lines of comment blocks? So for example your file is 1000 lines and the actual data is from line 80 to line 920 or something like that? In that case it could be fixed by skipping the first and/or last number of lines as if they are comment lines, take a look at issue #48

Otherwise this is not something the plugin will support, sorry.