How do I get .csv table view automatically in the file tab when opening?

I'm using code to generate a test .csv file in the project directory, then when I click to open the file, it opens as is if it's just text, as in, basically unreadable.

I see a little table icon show in the top right of the file tab content, and clicking that opens a window displaying the CSV content in a readable table. However, this table pop-up window is the only thing I can interact with; I can't work with any other windows or tabs in PHPStorm.

So, instead of being able to easily compare the results with something else, I have to take a screenshot. Really cumbersome.

Is there not some way to just have to file open in a tab that's already in table view? I've seen PHPStorm do something similar with other file types, like .xml or .xsd. I don't see why the table view can't just be in the file tab content pane.

I've already got CSV/TSV (.csv and .tsv) added in Preferences > Editor File Types (I think they were there by default), but I don't see how to do anything there but add/modify/delete/ignore file types, which isn't useful for me with this.

If there's no way to get the table view in a file tab automatically, then I guess the workaround is having the file open in my favorite CSV app...

0
9 comments

Oh, also, when I right-click the file and select Open In, there's no option to choose an app like Windows and Mac have; just an option to open in a file explorer or CLI.

0

This is interesting.
As soon as I open at least one .csv file in a Table view, all succeeding .csv files are being opened in that view as well, even on new projects. However, I have PhpStorm 2022.3 installed already, probably it is something that has just been introduced. What IDE version do you have? 

1

How did that happen?!

Maybe I missed something in documentation somewhere..

 

0

I'm using Mac PhpStorm 2022.1.4.

It states the build number but it doesn't let me highlight it. I'd copy-paste the whole window but it contains PII and I'm not good at editing that out in a Mac image editor. Looks like I can click a Copy button to get all info to paste to a text editor to highlight things, but I don't know why JetBrains doesn't let us highlight anything there 😆 So many amazing features on these apps, so many random pointless limitations.

Build #PS-221.6008.16, built on July 20, 2022

I don't know how relevant that is... should we only be passing around the basic version number like I did initially?

0

Oh, I just noticed the orange up-arrow at the top right of my PHPStorm, indicating an update is available.

I used to get a pop-up window when I opened or went to the app... I don't know why that stopped happening. I also don't seem to get a little (less intrusive) pop-up at the bottom right about it... maybe that's only for project pop-ups?

I don't know why this got so hard recently 😆 Maybe updating will make mine work like yours does. Looks like the update is for 2022.3.

0

Hey,

Just a gentle reminder, have you managed to install the PhpStorm 2022.3? Does it behave differently with the CSV files in your case?

0

I'm using version 2022.3.2 now. Most of my teammates unfortunately are using versions that are years old, so I get some friction between them just by updating.

When I open a CSV file now, it opens as text.

Now what?

0

Vadiru, could you please upload an example of this file to https://uploads.jetbrains.com/ and provide the ID? Also, attach a screenshot of how it displays in the IDE.

0

I was having the same issue and I noticed there are tabs at the bottom of the csv viewer, with the ‘Text’ tab being the default selection for me. Selecting ‘Data’ shows the familiar tabular data editor view.

 

0

Please sign in to leave a comment.