Excel Workbook Content Power Query: A How-To Guide
In this article
Power Query lets you pull data from an Excel workbook (or many workbooks) into a single, refreshable table without copying and pasting. The short version: open the workbook that will hold your combined data, go to Data > Get Data > From File > From Excel Workbook, select the source file, choose the table or sheet, then use Append or Merge to combine multiple sources, and finally Close & Load to a worksheet or the Data Model. You can also connect to the current workbook itself with Data > Get Data > From Other Sources > From Table/Range. The steps below assume Excel for Microsoft 365 on Windows; menu labels can differ slightly by version, device, or region, and the Mac version has the same commands under Data > Get Data.
What You'll Need
- Excel 2016 or later, or Microsoft 365. Power Query is built in under the Data tab; in older versions it was a separate add-in.
- Source workbooks saved and closed, ideally in a consistent folder. Power Query reads the saved file, not unsaved changes.
- Each source table or range should have a header row with unique column names, and consistent data types in each column.
- For folder-based combining, all workbooks should share the same sheet or table structure.
Step-by-Step
- Start in the destination workbook. Open the workbook where you want the combined result to live. This is the file that will store the query and the loaded table.
- Connect to the first source. Go to Data > Get Data > From File > From Excel Workbook. Browse to the source file, select it, and click Import. In the Navigator pane, tick the table or sheet you need and click Transform Data (not Load) so you can clean it before loading.
- Clean the first query. In the Power Query Editor, use Home > Remove Rows > Remove Top Rows if there are title rows above the header, then Home > Use First Row as Headers. Set each column's type with the icon at the left of the column header (for example Text, Whole Number, Date). Give the query a clear name in the Name box on the right.
- Repeat for each additional source. Use Home > New Source > Excel Workbook and repeat steps 2 and 3 for every file or table you want to combine. Each source becomes its own query; this keeps the cleaning steps separate and easier to fix later.
- Combine the queries. If the sources have the same columns, select the first query, then Home > Append Queries > Append Queries as New and add the other queries. If you need to match columns by a key instead, use Home > Merge Queries and pick the matching column in each table. Append stacks rows; Merge joins columns.
- Review the combined query. Check the Applied Steps list on the right for errors, confirm column types survived the append, and remove any helper columns you no longer need with right-click > Remove.
- Load the result. Click Home > Close & Load > Close & Load To. Choose Table for a worksheet table, or Only Create Connection if you want to use the data in the Data Model or another query. Loading to a table is the simplest option for most workbook content.
- Refresh when sources change. Save and close the source workbooks, then in the destination workbook use Data > Refresh All. To change the source path or file, use Data > Queries & Connections, right-click the query, and choose Edit to reopen the editor and update the Source step.
Common Mistakes
- Loading instead of transforming. Clicking Load straight from Navigator skips the cleaning step and often brings in title rows as data. Use Transform Data first.
- Mismatched headers. Append matches columns by name. If one file says "Customer" and another says "Customer Name", you get two columns with nulls. Rename headers before appending.
- Editing the loaded table by hand. Typing into a query output table is overwritten on the next refresh. Make changes in the source or in the query steps.
- Leaving source files open. Power Query reads the saved file; unsaved edits in an open workbook are not picked up, and a locked file can cause refresh errors.
- Hard-coded file paths. If you move the source workbook, the query breaks. Keep sources in a stable folder, or use a folder query so new files are picked up automatically.
Tips
- Name every query meaningfully in the editor; the Queries & Connections pane becomes much easier to navigate.
- Use From Folder (Data > Get Data > From File > From Folder) when you have many identically structured workbooks; Power Query combines them and refreshes as files are added.
- Keep a small sample workbook for testing query changes before pointing them at production files.
- Document your steps in a cell near the output table so colleagues know the data is refreshed, not typed.
- Set column types explicitly rather than relying on detection; it prevents mixed-type errors after refresh.
Troubleshooting
If refresh fails, first check that the source file still exists at the same path and is not open in another program. Then open the query in the editor and look at the Applied Steps: the step with an error icon is where the problem is. Common fixes are re-selecting the source file in the Source step, re-applying headers, or changing a column type from a specific type to Text to clear conversion errors. If a column shows Error values after an append, the two sources likely used different data types; set both to the same type before appending. If the query is slow, remove unnecessary columns early and filter rows before the append step. If the output table is missing after refresh, check that the load destination was set to a table and not Only Create Connection. For permission or credential prompts, use Data > Queries & Connections > Edit and re-enter credentials for the source. If the workbook itself is corrupted, open a copy and re-import the queries; keep a backup before any repair.
Frequently Asked Questions
Can Power Query read the workbook it is stored in?
Yes, with Data > Get Data > From Other Sources > From Table/Range, which reads an existing table or range in the current workbook. It is best for tables already in the file, not for arbitrary cells.
Does Power Query work on Excel for Mac?
Yes, the Data > Get Data commands are available in current Excel for Mac, though some connectors and the full editor layout differ from Windows. The core steps of get, transform, and load work the same way.
What happens to my query if I rename a source sheet?
The query may break because it references the sheet or table name. Reopen the editor, update the Source or Navigation step, and refresh. Renaming the table in the source is safer than renaming the sheet.
Can I combine workbooks with different column orders?
Yes, as long as the column names match. Append aligns columns by header name, not position, so reordering is fine but renaming is not.
Why does my loaded table show old data?
Queries do not refresh automatically unless you set it. Use Data > Refresh All, or right-click the query in Queries & Connections and choose Refresh. Check that source files are saved first.
Is Power Query available in Excel 2010?
Not built in. It was a separate add-in for some older versions and is not officially supported in current Excel 2010 installs. Use Excel 2016 or later for the built-in Data > Get Data experience.