Correct Excel idMso Identifier for the Power Query Tab
Question details
The user needs the correct idMso identifier to successfully hide the Power Query tab in Excel using custom ribbon XML.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Customizing the Excel ribbon interface using XML code to hide specific contextual tabs.
- Observed behavior
- The XML identifier TabSetQueryToolsExcel fails to hide the Query tab associated with Power Query.
Ensure you have access to your custom ribbon XML file and a basic understanding of XML editing for Microsoft Office applications.
Use the TabSetPowerQueryEdit Identifier in Custom XML
Replace the incorrect identifier with TabSetPowerQueryEdit, which specifically targets the modern Power Query edit tabs.
The standard TabSetQueryToolsExcel identifier does not apply to the newer Power Query tab structure in Excel. Updating your XML to target the specific Power Query identifier will allow you to control its visibility.
Open the custom ribbon XML file associated with your Excel workbook in a code editor.
Find the line of code attempting to control the Query tab. It typically looks like <tabSet idMso="TabSetQueryToolsExcel"... />.
Change the code to use the correct identifier: <tabSet idMso="TabSetPowerQueryEdit" getVisible="ribbon_tab_visible" />. Save the XML file and reload your Excel workbook to apply the changes.

Looking for a Lightweight Excel Alternative?
While custom XML ribbon development is highly specific to Microsoft Office, if you simply need powerful spreadsheet capabilities without the heavy software bloat, WPS Office is an excellent, free alternative. It offers a familiar interface and robust data processing tools.
- 1. Download WPS Office: Visit the official WPS website and download the free WPS Office installer.
- 2. Install the Software: Run the setup file and follow the on-screen instructions to install the application.
- 3. Open Your Workbooks: Launch WPS Spreadsheets and easily open your existing Excel workbooks to continue your data analysis uninterrupted.

Frequently Asked Questions
Why doesn't TabSetQueryToolsExcel hide the Power Query tab?
TabSetQueryToolsExcel refers to a legacy set of query tools in older Excel versions. For modern Power Query interfaces, TabSetPowerQueryEdit is the correct and recognized identifier.
Where can I find a list of all Excel control identifiers?
Microsoft provides an official reference workbook named excelcontrols.xlsx. This file contains a comprehensive list of all idMso identifiers required for advanced ribbon customization.
Where should I ask advanced Excel development questions?
The Microsoft Office Development community forums are the most appropriate channel to seek expert help for complex ribbon XML, VBA, and Office add-in development issues.




