janisdd / vscode-edit-csv

vs code extension to edit csv files with an excel like table ui
MIT License
212 stars 30 forks source link

I can't open this editor for my csv file #74

Closed WeiTing108AB8001 closed 2 years ago

WeiTing108AB8001 commented 2 years ago

What OS?

Version?

Description

I can't open this csv editor for my csv file that can work in other app such as excel. I have tried reopen my vscode and it didn't help. I created a temp csv file and try to open its csv editor in vscode, it can work.

Expected behavior

Resolve the problem with my csv file that can't work by this editor.

Steps to reproduce

1.Install the extension in vscode. 2.click my csv file in EXPLORER of vscode 3.click the upper right "Edit csv" 4.pop up a bottom right window show "Open a csv file first to show the csv editor"

janisdd commented 2 years ago

Can you please look at the status bar, at the very bottom right and check the detected language? It should say CSV (csv) or CSV (...) (csv (...)). Did you installed other csv related extensions (that might installed some new csv language ids)?

janisdd commented 2 years ago

@WeiTing108AB8001 I need more information about the issue...

janisdd commented 2 years ago

I guess this can be closed as it is probably connected with the detected file language.

astef commented 2 years ago

I see "Open a csv file first to show the csv editor" as well, even with correct language detected:

image

I have disabled all csv-related extensions and reloaded vs code many times.

I'm on windows, vs code 1.63.2

janisdd commented 2 years ago

I just tested again on a windows 7 vm with vs code 1.63.2 too and it works...

Is there anything special about the csv file? Or can you share the file? Does it happen with all csv files? Does it work if you only use, say the first 10 lines of the file (as a new csv file)?

astef commented 2 years ago

It happens with any csv files, and I have reproduced similar issue with https://marketplace.visualstudio.com/items?itemName=estivo.csv-editor - nothing happens when I run command.

janisdd commented 2 years ago

I have a comment in the code that there is an issue with files >50MB because then vscode.window.activeTextEditor will be falsy... Maybe all your csv files are larger than 50MB?

The only other thing might be that the csv detection is not working... (The last option would be to add more logging and check every step of the csv detection)

astef commented 2 years ago

You're right, all my files are ~60MB, and with smaller files it works! Thank you!

janisdd commented 2 years ago

Unfortunately this is a vs code limitation... I'll change the message to include this scenario.

And trying to use the extension with files >50MB would be extremely slow anyways ;D