Inline Query Editor for Excel
日本語
Connect to a running Excel and edit the Power Query (M) queries and Data Model measures (DAX) of its workbooks directly in VS Code.
Saving a file (Ctrl+S) applies it to Excel.
The extension follows the VS Code display language (English or Japanese).
Features
- Shows the queries and measures of all open workbooks in a tree in the sidebar
- Open queries and measures in editor tabs. Saving applies them to Excel, and [Apply History] restores earlier formulas
- M / DAX completion (keywords, functions, query names, step names, column names), parameter hints, hover, syntax errors, and formatting
- Outline and Steps views, Go to Definition (F12), Find All References (Shift+F12), Rename (F2), and a Dependencies view
- Preview each step (the "▶ Preview" code lens, Ctrl+Shift+Enter)
- Refresh (one or all) and cancel, with refresh failures shown
- Create, duplicate, delete, and rename; set and go to the load destination
- Export to and import from
.pq files
Requirements
- Windows 10 / 11 (x64 / arm64)
- Excel for Microsoft 365 / 2024 / 2021 / 2019 (desktop, 32-bit / 64-bit)
- VS Code 1.95 or later (desktop)
The .NET runtime is included in the extension, so you do not need to install it.
It does not work on macOS, Linux, or vscode.dev (Excel for Windows is required).
Usage
- Open a workbook in Excel
- Open "Inline Query Editor" in the Activity Bar to see the open workbooks and their queries and measures
- Click a query to open it in the editor. Edit it and save (Ctrl+S) to apply it to Excel
| Action |
Key |
| Apply |
Ctrl+S |
| Apply and refresh |
Ctrl+Shift+S |
| Preview up to the step at the caret |
Ctrl+Shift+Enter |
| Cancel a refresh or preview |
Esc |
Settings
| Setting |
Default |
Description |
inlineQueryEditor.preview.rowCount |
20 |
Number of rows to show in the preview |
inlineQueryEditor.refresh.timeoutMinutes |
10 |
Refresh timeout (minutes). 0 for no limit |
inlineQueryEditor.queries.sortByName |
false |
Sort queries by name |
inlineQueryEditor.trace.server |
off |
Log the communication with the language server |
Notes
- Only one of the add-in, the standalone app, or another VS Code window can connect to the same Excel. The extension does not connect to an Excel that has the add-in loaded.
- Local
.pq files are outside the scope of this extension (use an extension such as Microsoft's "Power Query / M Language").
Privacy
This extension does not connect to the internet and sends no telemetry. The contents of your workbooks never leave your PC.
See the privacy policy for details.
Feedback
Please report bugs and requests in GitHub Issues.
Support development
If this extension helps you, please support its development on GitHub Sponsors or Ko-fi.
日本語
実行中の Excel に接続し、ブックの Power Query(M 式)とデータモデルのメジャー(DAX 式)を VS Code で直接編集する拡張機能です。
保存(Ctrl+S)がそのまま Excel への適用になります。
画面は VS Code の表示言語(日本語または英語)に従います。
機能
- 開いているすべてのブックのクエリとメジャーをサイドバーのツリーに表示
- クエリ・メジャーをエディターのタブで開いて編集。保存で Excel に適用、[適用の履歴] から前の式に戻せる
- M / DAX の補完(キーワード、関数、クエリ名、ステップ名、列名)、パラメーターヒント、ホバー、構文エラーの表示、整形
- アウトライン・ステップのビュー、定義へ移動(F12)、参照の検索(Shift+F12)、名前の変更(F2)、依存関係のビュー
- ステップごとのプレビュー(コードレンズの「▶ プレビュー」、Ctrl+Shift+Enter)
- 更新(単一・すべて)と中断、更新の失敗の表示
- 新規作成・複製・削除・名前の変更、読み込み先の設定と移動
.pq ファイルへのエクスポート・インポート
動作環境
- Windows 10 / 11(x64 / arm64)
- Excel for Microsoft 365 / 2024 / 2021 / 2019(デスクトップ版、32bit / 64bit)
- VS Code 1.95 以降(デスクトップ版)
.NET ランタイムは拡張機能に同梱しているので、別途インストールする必要はありません。
macOS / Linux / vscode.dev では動作しません(Windows の Excel が必要です)。
使い方
- Excel でブックを開きます
- アクティビティバーの「Inline Query Editor」を開くと、開いているブックとそのクエリ・メジャーが表示されます
- クエリをクリックするとエディターに開きます。編集して保存(Ctrl+S)すると Excel に適用されます
| 操作 |
キー |
| 適用 |
Ctrl+S |
| 適用して更新 |
Ctrl+Shift+S |
| キャレットのあるステップまでプレビュー |
Ctrl+Shift+Enter |
| 更新・プレビューの中断 |
Esc |
設定
| 設定 |
既定 |
内容 |
inlineQueryEditor.preview.rowCount |
20 |
プレビューに表示する行数 |
inlineQueryEditor.refresh.timeoutMinutes |
10 |
更新のタイムアウト(分)。0 で無制限 |
inlineQueryEditor.queries.sortByName |
false |
クエリを名前順に並べる |
inlineQueryEditor.trace.server |
off |
言語サーバーとの通信を記録する |
注意
- 同じ Excel には、アドイン版・スタンドアロン版・ほかの VS Code ウィンドウのどれか 1 つしか接続できません。アドイン版を読み込んでいる Excel には接続しません。
- ローカルの
.pq ファイルはこの拡張機能の対象外です(Microsoft の「Power Query / M Language」拡張機能などをお使いください)。
プライバシー
この拡張機能はインターネットに接続せず、テレメトリも送信しません。ブックの内容が PC の外に送られることはありません。
詳しくはプライバシー ポリシーを参照してください。
フィードバック
不具合の報告や要望は GitHub の Issues へお願いします。
開発の支援
この拡張機能が役に立ったら、GitHub Sponsors または Ko-fi で開発のご支援をお願いします。