Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE REQUEST] Spreadsheet Mode #14546

Open
wisnoskij opened this issue Jan 4, 2024 · 7 comments
Open

[FEATURE REQUEST] Spreadsheet Mode #14546

wisnoskij opened this issue Jan 4, 2024 · 7 comments

Comments

@wisnoskij
Copy link

Hello and thank you to everyone who ever worked on this amazing project.

I expect this is too big of a feature to ever request, but searching for if this existed I found some other people hoping for this but no official feature requests.

So thought it might be worthwhile submitting an official request. It would be incredibly useful to me, if npp had a cell based view mode.

You would not want any equations or anything like that. Just working copy, paste, and csv support.

@chcg
Copy link
Contributor

chcg commented Jan 4, 2024

Maybe some plugins could be helpful:

@alankilborn
Copy link
Contributor

It would be incredibly useful to me, if npp had a cell based view mode.

IMO zero chance you'd ever see this in Notepad++.
Very much more likely in a plugin.

@wisnoskij
Copy link
Author

Maybe some plugins could be helpful:

* https://github.com/jokedst/CsvQuery

* https://github.com/BdR76/CSVLint/

Thank you, I had searched the plugins, but had not used CVS in the search. Those look interesting.

@molsonkiko
Copy link
Contributor

molsonkiko commented Jan 4, 2024

JsonTools also has a (somewhat experimental) regex search form that can allow the user to navigate, search and edit CSV files with a tree view (but not a table-based view).

As a person who's used all of these plugins, I'd summarize the pros and cons as follows:

CSVLint:

Pros:

  1. Probably the highest-performing of these plugins when working with CSV files
  2. pretty colors!
  3. Lets you edit files without writing any code
  4. actively updated
  5. Most tolerant of weird formatting issues
  6. Gives an error report

Cons:

  1. No spreadsheet-style view as the OP requested
    2. Not reliably able to parse documents with a delimiter/quote character other than the standard , and | and \t (go to settings, enter your desired delimiter and quote character)

CsvQuery

Pros:

  1. Spreadsheet-style view
  2. Allows queries based on SQL syntax, which is pretty universally well-known

Cons:

  1. Not actively maintained anymore
  2. The SQL dialect it uses is a really old version of SQLite, so it lacks nice things like common table expressions
  3. Limited ability to export to other formats
  4. In my experience, it seems to greatly increase the startup time of Notepad++

JsonTools

Pros:

  1. The treeview has built-in document navigation (as in, when you go to a row in the treeview, the caret is automatically moved to that location in the document)
  2. fast export to JSON (and also to CSV, but requires a bit more fiddling)
  3. actively maintained (by me!)
  4. Can handle any delimiter-quote character-newline combo, including weird stuff like CR newline, $ quote character and ! delimiter.

Cons:

  1. The user has to specify how many columns there are, and what the delimiter, newline, and quote character are (although I may add some rudimentary detection of these)
  2. Cannot parse CSV files that do not comply with RFC 4180, which means:
    • any values containing literal quote chars, delimiters or newlines must be wrapped in quotes
    • literal quote characters must be escaped by doubling them up (so I didn't would become 'I didn''t if ' was the quote character)

@BdR76
Copy link
Contributor

BdR76 commented Jan 4, 2024

@molsonkiko Thanks for the endorsement, but..

Cons:

  1. No spreadsheet-style view as the OP requested
  2. Not reliably able to parse documents with a delimiter other than the standard , and | and \t

There is a "spreadsheet-style view", sort of, when you go to Reformat > Align vertically. Although technically it's not just a "view", because it will change the text file and add lots of spaces.

Also, in the Settings dialog there is a setting Separators which is used by the CSV Lint auto-detect function. By default it's ,;\t| but you can add more, are there any other common ones missing in the default?

@molsonkiko
Copy link
Contributor

molsonkiko commented Jan 5, 2024

There is a "spreadsheet-style view", sort of, when you go to Reformat > Align vertically. Although technically it's not just a "view", because it will change the text file and add lots of spaces.

That's why I'm not calling it a view.

Also, in the Settings dialog there is a setting Separators which is used by the CSV Lint auto-detect function. By default it's ,;\t| but you can add more, are there any other common ones missing in the default?

When I initially posted my list above, I had thought that this was bugged for nonstandard delimiters (i.e., you could change that setting but it wouldn't do anything). That was incorrect (just tested it for a file with & delimiter and ' quote char), there is no bug, and I have amended my pros/cons list above.

@Coises
Copy link
Contributor

Coises commented Jan 7, 2024

@wisnoskij wrote:

So thought it might be worthwhile submitting an official request. It would be incredibly useful to me, if npp had a cell based view mode.

You would not want any equations or anything like that. Just working copy, paste, and csv support.

My Columns++ plugin might help, if your data is tab-delimited or you don’t mind temporarily converting it to tab-delimited for viewing and editing. Detailed help is available — check out the sections on Elastic tabstops and Conversion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants