Excel Power Query: Export Query Data Directly to XLSX
Question details
The user wants to know whether Power Query can export a query result directly to a standalone XLSX file.
- Product
- Microsoft Excel Power Query
- Device & OS
- not provided
- Scenario
- A query result needs to be saved or exported as an XLSX file, either manually or through an automated workflow.
- Observed behavior
- Power Query imports, transforms, and loads data, but it does not provide an M command that independently creates a plain XLSX export file.
Confirm that the query is returning the final data you need and decide whether it should be loaded to a worksheet or retained as a connection. For automated exports, verify that the workbook is stored in a location accessible to Office Scripts or Power Automate.
Load the Power Query result to a worksheet and save the workbook as XLSX
Use this approach when you need a one-time or manually controlled Excel export.
Power Query does not independently write a plain XLSX file. It loads the transformed result into the current workbook or keeps the query as a connection, after which Excel can save the workbook in XLSX format.
In Excel, open the Data tab and select Queries & Connections, then double-click the query or choose Edit to confirm the transformed result.
In Power Query Editor, select Home > Close & Load or Home > Close & Load To, then choose Table and select a worksheet destination.
Return to the workbook, select File > Save As, choose Excel Workbook (*.xlsx), select a destination, and click Save.
Automate the export with Office Scripts and Power Automate
Use this workflow when query results must be refreshed and exported repeatedly in Excel for the web.
Open and edit exported XLSX workbooks with WPS Office
WPS Office is a free, lightweight Microsoft Office alternative for opening, reviewing, editing, and saving the XLSX workbooks produced after a Power Query export. Its familiar spreadsheet interface supports a smooth transition for users who only need to work with the exported data rather than run Power Query itself.
- 1. Open the exported workbook: In WPS Spreadsheet, select Menu > Open and choose the exported .xlsx workbook.
- 2. Review and edit the data: Use the worksheet tabs, filters, formulas, and formatting tools to inspect or refine the exported query results.
- 3. Save in Excel format: Select Menu > Save As, choose Excel 2007-365 Workbook (*.xlsx), and click Save.

Frequently Asked Questions
Can Power Query use an M command to create an XLSX file?
No. Power Query M can retrieve and transform data, but it does not provide a standalone command for writing a query result directly to an XLSX file.
How do I export a Power Query result manually?
Load the query to a worksheet using Home > Close & Load or Close & Load To in Power Query Editor. Then use Excel's File > Save As and select Excel Workbook (*.xlsx).
Can Power Query keep the result without displaying it on a worksheet?
Yes. In the Load To dialog, select Only Create Connection. The query remains available in the workbook, but its result is not loaded into a worksheet table.
What is the best way to automate Power Query XLSX exports?
Load the result into a workbook table, use an Office Script to refresh or prepare the data, and call that script from a Power Automate flow that saves or copies the workbook.
Can WPS Office run Power Query exports?
WPS Office can open, edit, and save compatible XLSX workbooks, but it does not replace Microsoft's Power Query engine. Use Excel or an automation workflow to generate the export first, then open the file in WPS Office.




