Want to export and edit Power Query M code of your xlsx file in VSCode and get it back to xlsx? - Here is the plugin.
Please note
Plugin adds 4 items in right button pop-up menu named EEPQM***
It takes ~10 seconds for plugin to startup and show menu items
On click M->Excel, it forces Excel to update worksheet queries, but doesn't save your file
In order to save your changes you need either to close Excel manually or click 'EEPQM: Close with saving'
Close actions from popup doesn't kill Excel process, but hides it. Dont know how to kill it fully
It uses COM api to export queries, so it starts an Excel instance
Unfortunately, I can only start a new Excel instance. I cant use existing one. So, if you have already opened a spreadsheet with M, I will open it again in separate process. If you try to save, it causes exception
If Excel shows popups on startup, export fails. You need to close Excel popup manually
Some users reported that Excel starts a process with visbility=false. Not fixed yet.
Versions
Get Electron version of your VSCode via Help->About
1.1.1 supports Electron 7.2.1, NODE_MODULE_VERSION 75
1.1.5 supports Electron 9.2.1, NODE_MODULE_VERSION 80
1.1.6 supports Electron 11.3.0, NODE_MODULE_VERSION 85
Features
Export all M queries from xlsx/xlsm file to *.m file
Import queries from *.m file to xlsx/xlsm
Edit M code in VSCode and run queries in Excel immediately