How to view column-aligned CSV files in Visual Studio editor

kmote picture kmote · May 10, 2018 · Viewed 10.4k times · Source

Opening a .csv file in Visual Studio produces an unreadable jumbled mess. Is there any way to set up Visual Studio to automatically format these files in columns (a "grid-view", so to speak) so I can edit them directly in the IDE? Are there any tricks or workarounds or extensions that could make these files more easily readable?

(VSCode has what looks to be a fantastic extension for this sort of thing, but alas, it won't work in Visual Studio Pro/Enterprise. Also, BeyondCompare4 does this automatically, and Notepad++ has the TextFX plugin which supports this as well. Has no one ever produced such a plugin for VS?)

(UPDATE: I have created a feature request here. Please vote for it if you upvote this ticket.)

Answer

NicoWheat picture NicoWheat · Feb 4, 2020

You can install csv-viewer extensions by searching for them in the search tool in the VSCode "Extensions" menu.

Some good ones are 'Excel Viewer' by GrapeCity, or 'Edit csv' by janisdd.

Both of these (and many more) allow you to view excel files in columns inside VScode, not just text files as is default.