CSV viewer 2

The viewer plugin to display CSV files as an Excel-like table

You can download it from Github - DirectoryOpus-CSV-viewer-plugin. Please refer to the Readme file for instructions on installation and a list of features.

Currently, the plugin is quite simple and may not display all CSV files correctly. Please let me know in case you encounter any issues.

13 Likes

I have released a new version v2.0
Changes:

  • Also display the viewer for files inside archives
4 Likes

Thanks! Really useful. Not sure if it's just placebo, but it feels like it opens CSV files faster than Excel.

One suggestion: since the plugin lets you select the content, maybe you could add options to copy the selected row/cell to the clipboard?

Also, I've noticed the plugin seems to continuously autosize the columns and update its UI multiple times while loading content, which sometimes causes a few visual glitches. Can you disable the redraw until the content is fully loaded, and only update column widths once at the end?

it feels like it opens CSV files faster than Excel.

The plugin is just a WinAPI ListView, thus it should indeed be faster than Excel.

One suggestion: since the plugin lets you select the content, maybe you could add options to copy the selected row/cell to the clipboard?

Good suggestion. I have added this feature.

Also, I've noticed the plugin seems to continuously autosize the columns and update its UI multiple times while loading content, which sometimes causes a few visual glitches.

Yes, it is true. I haven't noticed it because my PC is very fast. I have fixed it. Thank you for the suggestion.

The new version with the abovementioned fixes is v3.0

2 Likes

Great Viewer. Woud it also be possible to detect Tab or Pipe "|" as delimeter.

For tab the file extension tsv could be used.

@ped,

I'm glad that you liked this plugin.

I think yes. It shouldn't be a problem. I have actually never seen pipe-delimited CSV files. However, apparently they do exist as far as I googled :slight_smile:

Ok, let me look into it. I will let you know in a couple of days.

@PolarGoose, thank you very much for your commitment and the time you invest here free of charge. I think it would be sufficient for now if you could just take the β€œtab” separator into account, as the pipe character is used much less frequently.

1 Like

MOCK_DATA.7z (20.7 KB)

The header is not recognized correctly in the following file. I have attached the file and a screenshot for you. However, it works fine with other files. Do you have any idea what the problem could be?

Great Viewer. Woud it also be possible to detect Tab or Pipe "|" as delimeter.

I have released a new version v4.0. It supports autodetection of tab and pipe signs.

1 Like

The problem is that CSV file doesn't contain any information if it has a header or not. In order to detect header my plugin has to do some heuristic. For this file the heuristic fails, because the header looks the same as the content.
Unfortunately I don't see how it can be improved. There will always be files for which heuristic will fail.

Can you add controls to the viewer through your plugin? Maybe where the title is like the metapane?
If so, you could include an option that says "use first line as headers". That would change at runtime whether the first line is treated as a header or not.

Good point. Yes, it is possible. Basically, any UI elements can be used inside the viewer. I just didn't want to make it more complex. It is a simple preview.