CSV Viewer/Editor - Searching CSV like Everything Search

Plug-in and third party software discussion.
Post Reply
Stamimail
Posts: 1122
Joined: Sat Aug 31, 2013 9:05 pm

CSV Viewer/Editor - Searching CSV like Everything Search

Post by Stamimail »

I'm looking for a tool can search CSV files the same way like Everything Search does, Search is filtering the lines in the table.
Suppose you have a Contacts or a Library data base, and you want to find/view fast the desired info in the data base.
froggie
Posts: 300
Joined: Wed Jun 12, 2013 10:43 pm

Re: CSV Viewer/Editor - Searching CSV like Everything Search

Post by froggie »

Just a single .csv file?

Try Notepad++ (even better with the Search+ plugin), any spreadsheet program (EXCEL, LibreOffice, etc), or just plain Notepad or Wordpad
salazor
Posts: 258
Joined: Tue Jun 17, 2014 10:52 am

Re: CSV Viewer/Editor - Searching CSV like Everything Search

Post by salazor »

You can also use CSVFileView from Nirsoft - only read... or CSVed: http://csved.sjfrancke.nl/
Stamimail
Posts: 1122
Joined: Sat Aug 31, 2013 9:05 pm

Re: CSV Viewer/Editor - Searching CSV like Everything Search

Post by Stamimail »

Thank you.
Just a single .csv file?
Yes. Support for more kinds of database files, is better of course.

I couldn't find the feature I was looking for but only in CSVFileView from Nirsoft (it's called there Quick Filter - Ctrl+Q).
This feature is good, and behaves like Everything, but I think CSVFileView still not enough good. Everything looks much better and has more features. the problem is that Everything designed for search files and not text of database.

The idea started from a library PC supposed to let the library users to search books from a database of books of the library.
Everything style ("Quick Filter") looks to me much better for use by many users, than Excel search dialog-box.
salazor
Posts: 258
Joined: Tue Jun 17, 2014 10:52 am

Re: CSV Viewer/Editor - Searching CSV like Everything Search

Post by salazor »

And you checked CSVed is an advanced editor .csv files.
Stamimail
Posts: 1122
Joined: Sat Aug 31, 2013 9:05 pm

Re: CSV Viewer/Editor - Searching CSV like Everything Search

Post by Stamimail »

@salazor
I've checked CSVed but not much. It's looked indeed as advanced tool. Maybe too advanced for the goal I looked for.
I think I didn't find there "Quick Filter" feature and also I had trouble to display Unicode characters correctly.
yrwin
Posts: 8
Joined: Wed Jan 18, 2017 10:18 am

Re: CSV Viewer/Editor - Searching CSV like Everything Search

Post by yrwin »

This question is a bit offtopic for everything, but i recommend Logparser (https://technet.microsoft.com/en-us/scr ... 19274.aspx). It has SQL-like access too.
NotNull
Posts: 5458
Joined: Wed May 24, 2017 9:22 pm

Re: CSV Viewer/Editor - Searching CSV like Everything Search

Post by NotNull »

Saw this on the AutoHotKey forum and remembered your question.
Sources are no longer available there (due to a hack, it seems), but can be found here.

Seems to do what you want. And if not: you can finetune the AHK code to your liking .. :)

BTW: I recommend Logparser too (handy tool; not only for logs, but most structured data), but maybe not specific for this purpose.
Stamimail
Posts: 1122
Joined: Sat Aug 31, 2013 9:05 pm

Re: CSV Viewer/Editor - Searching CSV like Everything Search

Post by Stamimail »

NotNull wrote:Saw this on the AutoHotKey forum and remembered your question..
Thanks. I tested it a little
CSV Quick Filter (CSVQF) also seems it has a way to do till it will reach Everything GUI features and performance.
BTW: I recommend Logparser too (handy tool; not only for logs, but most structured data),
I can't see a GUI here.
but maybe not specific for this purpose.
Maybe it would be better to find a Spreadsheet Program with this Quick Filter (Filter-As-You-Type) feature.
Stamimail
Posts: 1122
Joined: Sat Aug 31, 2013 9:05 pm

Re: CSV Viewer/Editor - Searching CSV like Everything Search

Post by Stamimail »

Yes. Looks like the commercial version of EmEditor has a Quick Filter with a good GUI features and performance.
Note for RTL users
EmEditor Support wrote:EmEditor curently doesn’t support RTL documents.
NotNull
Posts: 5458
Joined: Wed May 24, 2017 9:22 pm

Re: CSV Viewer/Editor - Searching CSV like Everything Search

Post by NotNull »

Another alternative:

In powershell, issue this command:

Code: Select all

Import-Csv c:\path\to\your.csv | Out-GridView
and take a closer look at all the interface elements
I think it will supprort RTL

type
help ogv
for more configuration options (or ask here :) )

EDIT: There are rather big improvements in Out-GridView with newer PS versions. Depending on what Windows verso=ion you will run this, you get extra options.
Stamimail
Posts: 1122
Joined: Sat Aug 31, 2013 9:05 pm

Re: CSV Viewer/Editor - Searching CSV like Everything Search

Post by Stamimail »

My experience with Powershell is very low. I remember I need to make changes with the policy or something like that. I'm using W7 x64.
Before going further with this, can you find a video (YouTube) or screenshot that describes what you saw?
NotNull
Posts: 5458
Joined: Wed May 24, 2017 9:22 pm

Re: CSV Viewer/Editor - Searching CSV like Everything Search

Post by NotNull »

Those execution policies (you remembered correctly :)) are for running .PS1 scripts.

In this case you can do without those policies:
- Run Powershell.exe
- Enter command
Import-csv c:\path\to\your.csv | Out-GridView


And there you go!

Import-csv has several options for importing ASCII, UTF8, etc layouts so things may not look perfect this 'first round'.
Just to give you an idea ..

I *did* create a snapshot to make it more clear, but was not allowed tro post it.
A video ? You're asking a lot from a command-line guy :) But I'll see what I can do for you ...
Stamimail
Posts: 1122
Joined: Sat Aug 31, 2013 9:05 pm

Re: CSV Viewer/Editor - Searching CSV like Everything Search

Post by Stamimail »

I managed to run it. Here's how it looks on my side:
https://snag.gy/9axf24.jpg

I didn't asked to record a video, just to try to find prepared one ...
NotNull
Posts: 5458
Joined: Wed May 24, 2017 9:22 pm

Re: CSV Viewer/Editor - Searching CSV like Everything Search

Post by NotNull »

Stamimail wrote: Wed Nov 28, 2018 11:05 pm I didn't asked to record a video, just to try to find prepared one ...
Ah, OK; missed that one ...

Still not in the neigbourhood of a Win7 machine. As an alternative:

1. Different input file
Try it with
Get-process | select * | out-gridview

Input (file) itself is less Important here; focus on the Filter bar and the "Add criteria" button and the search options tht hide behind it.

2. Different encoding
When importing your csv, you can use different encodings. On Win10 (PowerShell 5.1), those are:
  • Unicode
  • UTF7
  • UTF8
  • ASCII
  • UTF32
  • BigEndian
  • Unicode
  • Default
  • OEM
A
help import-csv
should show you the available encodings on Win7 / your PowerShell version (probably 2.0)

For example: try
Import-csv -Encoding Default "c:\path to \your.csv" | Out-GridView
to see if that displays your CSV better.


HTH ..
Stamimail
Posts: 1122
Joined: Sat Aug 31, 2013 9:05 pm

Re: CSV Viewer/Editor - Searching CSV like Everything Search

Post by Stamimail »

On W7 I couldn't find encoding options and
Import-csv -Encoding Default "c:\path to \your.csv" | Out-GridView
didn't work.
But I tested it on a W10 VM, and it worked.
https://snag.gy/J3s6r5.jpg

I like:
The default search applies on all columns.
The advanced search (Add criteria).
Search RTL Text works.

I dislike:
There is no highlighting of the search in results.
I couldn't flip the view, to get RTL layout.

Thank You.
NotNull
Posts: 5458
Joined: Wed May 24, 2017 9:22 pm

Re: CSV Viewer/Editor - Searching CSV like Everything Search

Post by NotNull »

You're welcome!

Whenever the next suitable CSV viewer appears on my radar, I'll post it.
Mharvey500
Posts: 3
Joined: Sun Feb 09, 2020 5:30 pm

Re: CSV Viewer/Editor - Searching CSV like Everything Search

Post by Mharvey500 »

What I need is a command line tool that searches a CSV file for lines that match a key to a specific field in the line, e.g. name or address, etc. This is needed for Windows but it would be nice to have it on Linux.
I currently have my data in a LibreOffice spreadsheet and I export it to CSV, then I run a PowerShell script to search the CSV file. I want to get away from PowerShell because of lack of portability.
I can't use a GUI because I need the search results as inputs to another program, in this case an audio file tagger.
This should all be done with one script without interacting with a Gui.
NotNull
Posts: 5458
Joined: Wed May 24, 2017 9:22 pm

Re: CSV Viewer/Editor - Searching CSV like Everything Search

Post by NotNull »

Mharvey500 wrote: Sun Feb 09, 2020 5:44 pm This is needed for Windows but it would be nice to have it on Linux.
Mharvey500 wrote: Sun Feb 09, 2020 5:44 pm I want to get away from PowerShell because of lack of portability.
:? PowerShell Core is supported on most Linux distributions (and LibreOffice can be scripted)
https://docs.microsoft.com/en-us/powers ... wershell-7
Mharvey500
Posts: 3
Joined: Sun Feb 09, 2020 5:30 pm

Re: CSV Viewer/Editor - Searching CSV like Everything Search

Post by Mharvey500 »

Thanks for the info. I was able to get gawk to search a tab separated file very quickly, much quicker than PowerShell.
"gawk -F $'\t'"
Do you know how to script LibreOffice to save or export an ods file to csv or tsv from command line?
NotNull
Posts: 5458
Joined: Wed May 24, 2017 9:22 pm

Re: CSV Viewer/Editor - Searching CSV like Everything Search

Post by NotNull »

Mharvey500 wrote: Sat Feb 29, 2020 2:43 pm Do you know how to script LibreOffice to save or export an ods file to csv or tsv from command line?

Code: Select all

"c:\Program Files\LibreOffice\program\soffice.exe" --convert-to csv t:\demo.ods  --headless
should do it, although that doesn't produce a CSV file on my (stripped to the bone) LibreOffice.

Typ soffice.exe --help for more options.
Mharvey500
Posts: 3
Joined: Sun Feb 09, 2020 5:30 pm

Re: CSV Viewer/Editor - Searching CSV like Everything Search

Post by Mharvey500 »

Referring to https://ask.libreoffice.org/en/question ... -id-144958
I had success producing a tab separated UTF-8 encoded file with,
"C:\Program Files\LibreOffice\program\soffice.exe" --headless --convert-to csv:"Text - txt - csv (StarCalc)":9,34,76 myfile.ods
where 9 is ascii for tab field separator, 34 is ascii for double quote text delimiter, and 76 is UTF-8 character set index.
NotNull
Posts: 5458
Joined: Wed May 24, 2017 9:22 pm

Re: CSV Viewer/Editor - Searching CSV like Everything Search

Post by NotNull »

Thank you for this!
Post Reply