You double-click a .xlsx in the Project view, expecting Excel to open, and instead a tab appears inside the IDE. Maybe it renders correctly, maybe it shows a wall of XML. Either way, the file is now open somewhere you did not intend, and the editor you wanted never launched.
This is not a bug and it is rarely caused by the IDE core. It is a file type association, and it is one setting away from being undone. The harder part is knowing which component claimed the extension, because it might be a built-in module you never installed on purpose, or a plugin you added months ago and forgot about.
Why an IDE claims a file type at all
Every IntelliJ-based IDE has a FileTypeManager that maps extensions to a parser. When you open a file, the IDE asks that manager which parser to use. If something registered .xlsx, the IDE opens it internally; if nothing did, the OS opens it with the default application.
The mapping is layered. Built-in modules register their formats at startup. Plugins register theirs through fileType extension points in their plugin.xml. And some plugins register for extensions they do not really own — a data tool that reads spreadsheets might claim .xlsx just so it can preview it, which is enough to steal the double-click.
That last case is the one people hit without realising. You install a database plugin for its SQL editor, and it quietly takes .xlsx, .csv, and .xls along the way.
Finding out who claimed the extension
Before changing anything, it helps to know the culprit. The IDE will tell you.
Open Settings → Editor → File Types. The list on the right shows every registered file type with its extensions. Find the one that lists xlsx — the name is usually the owning plugin or the built-in module. Select it and the "File name patterns" box underneath shows exactly what it claims, sometimes more than you expected.
Two things are worth checking while you are there:
-
Whether
.csvis also claimed. Many spreadsheet plugins take both. If you only wanted xlsx handling, the CSV takeover is unintended and will surprise you later. - Whether the type is a plugin's or the platform's. If it belongs to a plugin you can also just disable that plugin, which is cleaner than editing patterns if you do not need the tool at all.
Taking the association back
There are three levels of fix, from surgical to blunt.
Remove only the extension. In the same File Types screen, select the type, delete *.xlsx from the patterns list, and apply. The type stays for other files; only the xlsx claim disappears. This is the cleanest option when you want to keep the plugin for its actual purpose.
Disable the plugin. Settings → Plugins → find the owner → disable → restart. Blunt but reliable, and it also stops the plugin from claiming other formats you have not noticed yet.
Reset to defaults. If the list has become a mess after installing and uninstalling several tools, restoring default file types clears the accumulated claims. Do this knowing it will also reset customisations you made on purpose.
After any of these, the change is immediate — no restart needed for the pattern edit, though plugins that cache the mapping may need one.
The catch: what you lose when you take it back
Blocking the IDE from opening spreadsheets means you are back to alt-tabbing into Excel for every small edit. For a one-off look at a fixture, that is fine. For the case where you keep fixing test data inside a repository, it is the exact friction the plugin existed to remove.
There is also a subtler cost. Once .xlsx opens externally, the IDE stops indexing the file contents, which some refactoring and search features rely on. Usually that is what you want — a binary blob is not something you search — but if a workflow depended on it, you will notice.
The practical answer is usually not "block everything" but "block the sloppy plugin, keep a careful one."
How to tell a careful plugin from a sloppy one
The behaviour that created this problem is exactly what separates good spreadsheet plugins from bad ones: what file types does it claim, and does it say so?
A plugin that claims .xlsx, .xlsm, .xls, and .csv on install is making decisions for you about four formats, and it is unlikely to handle all four well. The legacy .xls format in particular is a completely different binary container, and tools that "support" it often just fail quietly.
A plugin that claims only what it actually parses, and says so in the description, is a different proposition. So is one that lets you disable the association without uninstalling.
There is a quick test you can run before installing anything. Open the plugin's Marketplace page and read the description for the words "opens", "claims", or a list of extensions. A careful author states the claim explicitly, because they know it is a promise. A vague author lets the plugin take whatever it can parse.
A second test is what happens after you uninstall. File type claims registered at runtime sometimes outlive the plugin that made them, leaving a dead association that makes files open in a broken tab. If the plugin's reviews mention anything like "my files still open in it after uninstalling", that association is sticky and you should assume it will happen to you.
This is the choice I made when building Excel Lite on JetBrains Marketplace: it claims .xlsx and .xlsm only, and deliberately does not claim .csv or .xls, because it does not handle either properly. If you prefer Excel for spreadsheets, deleting the xlsx pattern in File Types turns it off without uninstalling.
When keeping the IDE association is right
For all the annoyance, there is a real case for it: a spreadsheet that lives in your repository and changes often. Test fixtures, seed data, configuration workbooks that a non-developer maintains. Opening those in Excel means a context switch, and switching back means losing your place.
The distinction that matters is where the file lives, not what format it is. A one-off file on your desktop belongs in Excel. A file in src/test/resources that you edit three times a week belongs wherever you can edit it without leaving the IDE — as long as the tool writing it does not damage it.
That last clause is doing a lot of work. A spreadsheet editor that saves by rewriting the whole package can drop formatting, and one that writes in place can leave a truncated file if the process dies. If you are going to keep the association, keep it for a tool that writes to a temporary file and replaces the original atomically, not one that overwrites.
FAQ
I removed the pattern but the IDE still opens xlsx. Why?
Another registered type may also claim it. Check every entry in File Types rather than just the obvious one, and check whether a plugin registered the extension at runtime rather than in its descriptor.
Will disabling the plugin lose my settings?
Plugin settings generally survive a disable/enable cycle, but some tools store configuration in a project file that stays behind. If the settings matter, note them before disabling.
Can I make Excel the default for only one project?
File type associations are IDE-wide, not per project. If you need project-specific behaviour, the practical workaround is a scope rule in your OS file manager or a separate IDE configuration.
Does this affect .xlsm macro workbooks?
The association is per extension, so removing .xlsx alone leaves .xlsm claimed. Most spreadsheet plugins register both — check the pattern list for *.xlsm separately.
Why does the IDE open CSV as a table instead of text?
Because a plugin claimed .csv too. CSV is text, and most developers want it as text. Removing the CSV pattern is usually the right fix, and it is a good reason to prefer plugins that do not claim it in the first place.
Sources
-
IntelliJ Platform — File type registration — how
fileTypeextension points claim extensions - IntelliJ IDEA — File type associations — the settings screen used above
- Stack Overflow — Prevent IntelliJ IDEA from opening .xls files internally — the same problem reported by another user
- Microsoft — Differences between CSV and xlsx — why CSV and xlsx cannot share a parser
-
Apache POI — Spreadsheet formats — what
.xlsx,.xlsmand legacy.xlsactually are
Conclusion
An IDE opening your spreadsheets is a file type association, and associations are editable. Find the owner in File Types, delete the extension pattern, and the double-click goes back to Excel immediately.
The more useful habit is checking what a plugin claims before installing it. A tool that takes only the formats it parses, and says so, will not surprise you later — and if it does, you can turn it off without uninstalling anything.
Top comments (0)