Power Query cannot open a Word document (.docx) directly as a native data source in the same way it handles Excel workbooks or CSV files. To get Word data into Power Query, you must first save the Word document as a PDF or a Plain Text (.txt) file, or use a Word table converted to an Excel range, as Power Query requires structured or semi-structured data to function. Once the file is in a supported format, you can use the Data tab in Excel to connect to the file and transform the content.

What You'll Need

  • Microsoft Word (to prepare the source document).
  • Microsoft Excel with Power Query (built-in to Excel 2016 and later).
  • A Word document containing the data you wish to extract, ideally organized in tables or consistent lists.

Step-by-Step

Since Power Query does not have a "From Word" button, the most reliable method for extracting structured data (like tables) is via the PDF connector, which is highly effective at recognizing Word-generated tables. Note that menu labels may differ slightly depending on your version of Excel or your region.

  1. Prepare the Word Document: Open your document in Microsoft Word. Ensure that any data you want to import is inside a formal Word Table (Insert > Table) rather than just separated by tabs or spaces. This ensures Power Query can identify the rows and columns.
  2. Save as PDF: Go to File > Save As. In the file type dropdown menu, select PDF (*.pdf). Save the file to a known folder on your local drive or OneDrive. This step is critical because Power Query's PDF connector is specifically designed to parse the layout of documents.
  3. Launch Power Query in Excel: Open a new or existing Excel workbook. Navigate to the Data tab on the ribbon.
  4. Connect to the PDF: Click on Get Data > From File > From PDF. Browse to the folder where you saved your Word-to-PDF file, select it, and click Import.
  5. Select the Data: The Navigator window will appear. Power Query will scan the PDF and list all detected tables and pages. Look for items labeled "Table 001," "Table 002," etc. Click on a table to see a preview. If the data looks correct, select the checkbox for that table.
  6. Transform the Data: Do not click Load immediately. Instead, click Transform Data. This opens the Power Query Editor window, where you can clean the data.
  7. Clean the Columns: Often, PDF imports result in "Column1," "Column2," etc. If the first row of your data contains the actual headers, go to the Home tab in the editor and select Use First Row as Headers.
  8. Remove Unwanted Rows: If there are empty rows or page headers/footers that were captured, use the Remove Rows > Remove Top Rows or Remove Bottom Rows options.
  9. Set Data Types: Click the icon next to the column header (e.g., ABC or 123) to ensure dates are set as Date and currency is set as Decimal Number. This prevents errors during analysis.
  10. Load to Excel: Once the data is clean, click Close & Load. The data from your Word document will now appear in a formatted Excel table.

Common Mistakes

One of the most frequent errors is attempting to import a .docx file directly through the "From Text/CSV" connector. This will result in a screen full of garbled symbols and binary code because .docx files are actually zipped XML files, not plain text. Never try to force a Word file into a text connector.

Another mistake is failing to use actual tables in Word. If you use the space bar or tab key to align columns in Word, the PDF connector will likely see the entire page as a single column of text rather than a structured table. This forces you to spend hours in the Power Query Editor using "Split Column by Delimiter," which is prone to error if the spacing is inconsistent.

Users also frequently forget to save a new version of the PDF when the Word document changes. If you update the Word file but don't re-save the PDF, the Excel query will continue to pull the old data. You must overwrite the existing PDF file with the same name for the "Refresh" button in Excel to work correctly.

Tips

To make the import process seamless, keep your Word tables simple. Avoid merged cells or nested tables, as these often confuse the PDF parser and can lead to shifted columns or "null" values appearing in your Excel sheet. If you have merged cells, unmerge them in Word before exporting to PDF.

If you have a massive amount of text (rather than tables) that you need to analyze, save the Word document as a Plain Text (.txt) file. Then, use Get Data > From File > From Text/CSV. This is better for sentiment analysis or keyword searching where the tabular structure doesn't matter.

For those managing recurring reports, save the PDF in a dedicated folder. If you have multiple Word documents with the same structure, save them all as PDFs in one folder and use Get Data > From File > From Folder. This allows Power Query to combine all Word-based PDFs into one master list automatically.

Troubleshooting

If the Navigator window does not show any tables and only shows "Pages," it means Power Query could not identify a formal table structure in your Word document. The first step is to go back to Word, select your data, and go to Insert > Table > Convert Text to Table. Once converted, re-save as PDF and try the import again.

If you see "Expression.Error: The key didn't match any rows in the table," it usually means the structure of the PDF changed (e.g., a table was deleted or renamed). To fix this, open the Power Query Editor, click on the "Source" or "Navigation" step in the Applied Steps pane on the right, and re-select the correct table from the list.

If the data appears shifted or columns are merged, check for hidden characters in the Word document. Using the "Show/Hide ΒΆ" button in Word can reveal unexpected tabs or section breaks that disrupt the PDF export. Remove these breaks and re-export.

If Excel freezes during the PDF import, check the file size. Very large Word documents converted to PDF can be memory-intensive. Try splitting the Word document into smaller files or removing high-resolution images before saving as PDF, as images increase file size but provide no value to Power Query.

Frequently Asked Questions

Can Power Query connect to Word in real-time?

No, there is no live link between a .docx file and Power Query. You must export the Word file to a supported format (like PDF) and then refresh the query in Excel to see updates.

Which is better: saving as PDF or saving as Text?

Use PDF if you have tables, as it preserves the grid structure. Use Plain Text (.txt) if you are importing long paragraphs or lists that do not require columns.

Do I need a special plugin for this to work?

No, the PDF connector is a standard feature in modern versions of Excel (Microsoft 365 and Excel 2019/2021). No third-party software is required.

Will this work with Google Docs?

Yes, provided you download the Google Doc as a PDF or .txt file first. Power Query cannot connect directly to a live Google Doc URL without using a web API or a third-party connector.

Can I import images from Word using Power Query?

No, Power Query is designed for tabular and text data. It cannot extract or import images, shapes, or charts from a Word document.