Power Query Problems

Fix Invalid or Encoded PDF Data in Excel Power Query

Rana GarciaRana Garcia Nov 12, 2026 868 views

Question details

The user needs to import readable, usable data from a PDF through Excel Power Query instead of receiving random, encoded, or unreadable characters.

Fix Invalid or Encoded PDF Data in Excel Power Query
Product
Microsoft Excel Power Query
Device & OS
not provided
Scenario
A PDF file is connected through the Power Query PDF connector for data extraction.
Observed behavior
Power Query connects to the PDF but displays corrupted-looking text, encoded characters, or data that does not match the original document.
Before you start

Open the PDF in a PDF viewer and test whether you can select and copy its text correctly. If copied text is already unreadable or the document is an image-only scan, Power Query cannot reliably extract clean text without preprocessing.

Solution 1Recommended

Check whether the PDF contains selectable text or requires OCR

Use this first when Power Query returns unreadable characters, especially with scanned PDFs or documents created from images.

Power Query can extract embedded text and table structures, but it cannot accurately interpret a PDF that contains only scanned page images. Optical character recognition (OCR) creates a searchable text layer that can be imported more reliably.

1
Test text selection in the PDF

Open the PDF in Adobe Acrobat Reader or another PDF viewer, drag to select a sentence or table value, and copy it into a plain-text editor such as Notepad.

2
Identify a scanned or image-only file

If you cannot select individual words, or the pasted text is blank or nonsensical, treat the document as a scan rather than a text-based PDF.

3
Run OCR and save a searchable copy

Use the OCR or Recognize Text command in your PDF software, then save the result as a searchable PDF or export it to Excel, CSV, or text.

4
Import the processed file again

In Excel, select Data > Get Data > From File > From PDF, choose the OCR-processed PDF, and review the Navigator preview before loading or transforming the data.

Check whether the PDF contains selectable text or requires OCR
OCR results may need cleanup: Review names, dates, decimals, and table columns after OCR, as recognition quality depends on scan resolution, language, and document layout.
Free Microsoft Office alternative

Open Cleaned PDF Exports in WPS Office Spreadsheets

If Excel Power Query cannot interpret a complex PDF correctly, first export or clean the document as an Excel workbook or CSV file. WPS Office is a free, lightweight alternative for opening, reviewing, and editing the cleaned spreadsheet with a familiar spreadsheet interface and smooth migration from Microsoft Office files.

Open cleaned PDF exports in XLSX or CSV format for review and editing.Compatible with Microsoft Excel .xlsx, .xls, and .csv file formats.Use a familiar spreadsheet workspace after converting PDF tables.Free and lightweight for everyday spreadsheet work and file migration.
microsoft office alternative - wps office

Frequently Asked Questions

Why does Power Query show random characters when importing a PDF?

The PDF may use unsupported text encoding, embedded fonts, a complex layout, or image-only scanned pages. Test copied text in a plain-text editor to determine whether the issue is already present in the PDF.

Can Excel Power Query extract tables from scanned PDFs?

Not reliably without OCR. Convert the scan into a searchable PDF or export recognized text and tables to XLSX or CSV first, then import that processed file through Data > Get Data.

How can I tell whether a PDF is scanned or text-based?

Open the document in a PDF viewer and try selecting one word. A text-based PDF lets you select individual words and paste readable text; a scanned PDF generally selects only an image area or pastes no usable text.

Do PDF security settings affect Power Query imports?

Yes. Restrictions on copying or content extraction can limit access to the PDF text. Check File > Properties > Security in your PDF viewer and remove restrictions only if you are authorized to do so.

What file format should I use instead of PDF for Power Query?

Use the original XLSX or CSV file whenever possible. If only a PDF is available, export it to XLSX, CSV, or TXT with a PDF conversion tool and inspect the result before loading it into Power Query.