Excel Power Query Editor
A modern, reliable VS Code extension for editing Power Query M code from Excel files

� Installation
From VS Code Marketplace (Recommended)
VS Code Extensions View:
- Open VS Code → Extensions (Ctrl+Shift+X)
- Search for "Excel Power Query Editor"
- Click Install
Command Line:
code --install-extension ewc3labs.excel-power-query-editor
Direct Link: Install from Marketplace
Alternative: From VSIX File
Download and install a specific version manually:
code --install-extension excel-power-query-editor-[version].vsix
🚨 IMPORTANT: Required Extension
This extension requires the Microsoft Power Query / M Language extension for proper syntax highlighting and IntelliSense:
powerquery.vscode-powerquery
The Power Query extension will be automatically installed when you install this extension (via Extension Pack).
📚 Complete Documentation
⚡ Quick Start
- Install: Search "Excel Power Query Editor" in Extensions view
- Open Excel file: Right-click
.xlsx
/.xlsm
→ "Extract Power Query from Excel"
- Edit: Modify the generated
.m
file with full VS Code features
- Auto-Sync: Right-click
.m
file → "Toggle Watch" for automatic sync on save
- Enjoy: Modern Power Query development workflow! 🎉
Why This Extension?
Excel's Power Query editor is painful to use. This extension brings the power of VS Code to Power Query development:
- 🚀 Modern Architecture: No COM/ActiveX dependencies that break with VS Code updates
- 🔧 Reliable: Direct Excel file parsing - no Excel installation required
- 🌐 Cross-Platform: Works on Windows, macOS, and Linux
- ⚡ Fast: Instant startup, no waiting for COM objects
- 🎨 Beautiful: Syntax highlighting, IntelliSense, and proper formatting
The Problem This Solves
Original EditExcelPQM extension (and Excel's built-in editor) suffer from:
- ❌ Breaks with every VS Code update (COM/ActiveX issues)
- ❌ Windows-only, requires Excel installed
- ❌ Leaves Excel zombie processes
- ❌ Unreliable startup (popup dependencies)
- ❌ Terrible editing experience
This extension provides:
- ✅ Update-resistant architecture
- ✅ Works without Excel installed
- ✅ Clean, reliable operation
- ✅ Cross-platform compatibility
- ✅ Modern VS Code integration
Features
- Extract Power Query from Excel: Right-click on
.xlsx
or .xlsm
files to extract Power Query definitions to .m
files
- Edit with Syntax Highlighting: Full Power Query M language support with syntax highlighting
- Auto-Sync: Watch
.m
files for changes and automatically sync back to Excel
- No COM Dependencies: Works without Excel installed, uses direct file parsing
- Cross-Platform: Works on Windows, macOS, and Linux
Usage
- Right-click on an Excel file (
.xlsx
or .xlsm
) in the Explorer
- Select "Extract Power Query from Excel"
- The extension will create
.m
files in a new folder next to your Excel file
- Open the
.m
files to edit your Power Query code
Edit Power Query Code
.m
files have full syntax highlighting for Power Query M language
- IntelliSense support for Power Query functions and keywords
- Proper indentation and bracket matching
Sync Changes Back to Excel
- Open a
.m
file
- Right-click in the editor and select "Sync Power Query to Excel"
- Or use the sync button in the editor toolbar
- The extension will update the corresponding Excel file
Auto-Watch for Changes
- Open a
.m
file
- Right-click and select "Watch Power Query File"
- The extension will automatically sync changes to Excel when you save
- A status bar indicator shows the watching status
Commands
Excel Power Query: Extract from Excel
- Extract Power Query definitions from Excel file (creates filename_PowerQuery.m
in same folder)
Excel Power Query: Sync to Excel
- Sync current .m file back to Excel
Excel Power Query: Sync & Delete
- Sync .m file to Excel and delete the .m file (with confirmation)
Excel Power Query: Watch File
- Start watching current .m file for automatic sync on save
Excel Power Query: Stop Watching
- Stop watching current file
Excel Power Query: Raw Extraction (Debug)
- Extract all Excel content for debugging
Requirements
- VS Code 1.96.0 or later
- No Excel installation required (uses direct file parsing)
Known Limitations
- Currently supports basic Power Query extraction (advanced features coming soon)
- Excel file backup is created automatically before modifications
- Some complex Power Query features may not be fully supported yet
Development
This extension is built with:
- TypeScript
- xlsx library for Excel file parsing
- chokidar for file watching
- esbuild for bundling
Building from Source
npm install
npm run compile
Testing
npm test
Acknowledgments
Inspired by the original EditExcelPQM by Alexander Malanov, but completely rewritten with modern architecture to solve reliability issues.
⚙️ Settings
The extension provides comprehensive settings for customizing your workflow. Access via File
> Preferences
> Settings
> search "Excel Power Query":
Watch & Auto-Sync Settings
Setting |
Default |
Description |
Watch Always |
false |
Automatically start watching when extracting Power Query files. Perfect for active development. |
Watch Off On Delete |
true |
Automatically stop watching when .m files are deleted (prevents zombie watchers). |
Sync Delete Turns Watch Off |
true |
Stop watching when using "Sync & Delete" command. |
Show Status Bar Info |
true |
Display watch status in status bar (e.g., "👁 Watching 3 PQ files"). |
Backup & Safety Settings
Setting |
Default |
Description |
Auto Backup Before Sync |
true |
Create automatic backups before syncing to Excel files. |
Backup Location |
"sameFolder" |
Where to store backup files: "sameFolder" , "tempFolder" , or "custom" . |
Custom Backup Path |
"" |
Custom path for backups (when Backup Location is "custom"). Supports relative paths like ./backups . |
Max Backups |
5 |
Maximum backup files to keep per Excel file (1-50). Older backups are auto-deleted. |
Auto Cleanup Backups |
true |
Automatically delete old backups when exceeding Max Backups limit. |
User Experience Settings
Setting |
Default |
Description |
Sync Delete Always Confirm |
true |
Ask for confirmation before "Sync & Delete" (uncheck for instant deletion). |
Verbose Mode |
false |
Show detailed logging in Output panel for debugging and monitoring. |
Debug Mode |
false |
Enable advanced debug logging and save debug files for troubleshooting. |
Sync Timeout |
30000 |
Timeout in milliseconds for sync operations (5000-120000). |
Example Workflows
🔄 Active Development Setup:
{
"excel-power-query-editor.watchAlways": true,
"excel-power-query-editor.verboseMode": true,
"excel-power-query-editor.maxBackups": 10
}
🛡️ Conservative/Production Setup:
{
"excel-power-query-editor.watchAlways": false,
"excel-power-query-editor.maxBackups": 3,
"excel-power-query-editor.backupLocation": "custom",
"excel-power-query-editor.customBackupPath": "./excel-backups"
}
⚡ Speed/Minimal Setup:
{
"excel-power-query-editor.autoBackupBeforeSync": false,
"excel-power-query-editor.syncDeleteAlwaysConfirm": false,
"excel-power-query-editor.showStatusBarInfo": false
}
Accessing Verbose Output
When Verbose Mode is enabled:
- Go to
View
> Output
- Select "Excel Power Query Editor" from the dropdown
- See detailed logs of all operations, watch events, and errors
💖 Support This Project
If this extension saves you time and makes your Power Query development more enjoyable, consider supporting its development:

Your support helps:
- 🛠️ Continue development and add new features
- 🐛 Fix bugs and improve reliability
- 📚 Maintain documentation and user guides
- 💡 Respond to feature requests from the community
Even a small contribution makes a big difference!
Contributing
Contributions are welcome! This extension is built to serve the Power Query community.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
)
- Commit your changes (
git commit -m 'Add amazing feature'
)
- Push to the branch (
git push origin feature/amazing-feature
)
- Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Made with ❤️ for the Power Query community by EWC3 Labs
Because editing Power Query in Excel shouldn't be painful.
☕ Enjoying this extension? Buy me a coffee to support continued development!
Credits and Attribution
This extension uses the excellent excel-datamashup library by Vladinator for robust Excel Power Query extraction. The excel-datamashup library is licensed under GPL-3.0 and provides the core functionality for parsing Excel DataMashup binary formats.
Special thanks to:
- Vladinator for creating the excel-datamashup library that makes reliable Power Query extraction possible
- The Power Query community for feedback and inspiration
This VS Code extension adds the user interface, file management, and editing workflow on top of the excel-datamashup parsing engine.
🤝 Recommended Extensions
This extension works best with these companion extensions:
powerquery.vscode-powerquery,grapecity.gc-excelviewer
The Power Query extension is automatically installed via Extension Pack when you install this extension.