#PowerQuery – Easily Copy all queries from a PBIX to Excel and vice versa

Today I discovered a way to easily copy all queries (including the groups) from a PBIX file to Excel without entering the power query editor in Excel.

In my case I needed to copy the data returned by a query and find it some much easier to get the data using Excel instead of generating a csv file from a visual in Power BI Desktop and importing that into Excel.

My PBIX contains some queries to extract weather data from different stations in Sweden.

These are grouped to create a logic structure of the queries.

Select all queries and copy them.

Now open a blank workbook and click the Queries & connections in the Data tab in the ribbon

And the Queries & Connections panels opens

Now right click in the panel

And select Paste – and the queries, parameters and load settings for the queries are also included.

For the table you want to load you now need to specify whether you want to load to the table to the datamodel or to a worksheet – default will be worksheet.

If you collapse all your groups in the panel and select all of them you can also copy them

And paste them into the Power Query editor in the Power BI Desktop

And after paste

Hope you this can help you too and stay Queryious

8 thoughts on “#PowerQuery – Easily Copy all queries from a PBIX to Excel and vice versa

  1. Pingback: Moving Queries to and from Power BI Desktop and Excel – Curated SQL

  2. Pingback: Power BI case studies, AI for Health and more… (Roundup | April 27, 2020) – Datalytical

  3. Pingback: Miscellany | Professional Visual Analysis with Excel

  4. Pingback: Power Automate To Automatically Refresh Excel And Send Emails Without Manual Interaction - Programming Questions And Solutions Blog

Leave a comment