Page 1 of 1

CSV Viewer/Editor - Searching CSV like Everything Search

Posted: Sun Jan 22, 2017 10:45 am
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.

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

Posted: Sun Jan 22, 2017 10:30 pm
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

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

Posted: Mon Jan 23, 2017 12:10 am
by salazor
You can also use CSVFileView from Nirsoft - only read... or CSVed: http://csved.sjfrancke.nl/

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

Posted: Mon Jan 23, 2017 11:46 pm
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.

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

Posted: Sat Jan 28, 2017 4:12 pm
by salazor
And you checked CSVed is an advanced editor .csv files.

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

Posted: Sat Jan 28, 2017 11:10 pm
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.

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

Posted: Wed Feb 08, 2017 7:51 am
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.

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

Posted: Thu May 03, 2018 3:50 pm
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.

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

Posted: Fri May 04, 2018 1:49 pm
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.

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

Posted: Fri May 04, 2018 3:02 pm
by tuska

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

Posted: Sat May 05, 2018 10:01 pm
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.

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

Posted: Fri Nov 23, 2018 3:44 pm
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.

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

Posted: Mon Nov 26, 2018 9:04 pm
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?

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

Posted: Wed Nov 28, 2018 7:11 pm
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 ...

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

Posted: Wed Nov 28, 2018 11:05 pm
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 ...

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

Posted: Fri Nov 30, 2018 4:34 pm
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 ..

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

Posted: Mon Dec 03, 2018 9:56 pm
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.

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

Posted: Tue Dec 04, 2018 7:54 pm
by NotNull
You're welcome!

Whenever the next suitable CSV viewer appears on my radar, I'll post it.

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

Posted: Sun Feb 09, 2020 5:44 pm
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.

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

Posted: Sat Feb 29, 2020 2:04 pm
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

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

Posted: Sat Feb 29, 2020 2:43 pm
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?

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

Posted: Sat Feb 29, 2020 3:11 pm
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.

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

Posted: Sat Mar 21, 2020 3:09 am
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.

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

Posted: Sun Mar 22, 2020 9:42 am
by NotNull
Thank you for this!