Power Query Problems

How to Compare a PDF Trial Balance with an Excel Spreadsheet

Tauseeq MagsiTauseeq Magsi Oct 10, 2026 871 views

Question details

The user needs to automate the comparison of payment IDs between a PDF trial balance and an existing Excel spreadsheet to avoid slow and error-prone manual matching.

How to Compare a PDF Trial Balance with an Excel Spreadsheet
Product
Microsoft Excel
Device & OS
not provided
Scenario
Reconciling financial data by comparing a trial balance in PDF format against records in an Excel spreadsheet.
Observed behavior
Manually matching hundreds of IDs is inefficient and prone to errors; the goal is to import and automatically compare the data using Excel.
Before you start

Ensure your PDF trial balance contains selectable text and properly formatted tables for a smoother data import process.

Solution 1Recommended

Use Power Query to Import PDF and Merge Data

Import the PDF tabular data directly into Excel using Power Query, then merge it with your existing spreadsheet for automated comparison.

Excel's Power Query feature is the most efficient way to extract tables directly from a PDF document without needing third-party conversion tools.

1
Import the PDF File

In Excel, navigate to the Data tab on the ribbon. Click on 'Get Data', select 'From File', and then choose 'From PDF'. Locate and select your trial balance PDF file, then click Import.

2
Select the Data Table

The Navigator window will appear, displaying all tables and pages detected in the PDF. Select the table containing your trial balance data and click 'Transform Data' to open the Power Query Editor.

3
Clean and Merge Queries

In the Power Query Editor, ensure your payment IDs are formatted correctly. Load your existing Excel spreadsheet data into Power Query as well, then use the 'Merge Queries' feature to join both tables based on the payment ID column.

4
Load and Highlight Mismatches

Click 'Close & Load' to bring the combined data back into an Excel worksheet. You can now easily apply Conditional Formatting to the merged columns to highlight missing or non-matching transactions.

Use Power Query to Import PDF and Merge Data
Time-saving Tip: Once this Power Query is set up, you can reuse it for next month's trial balance. Simply save the new PDF with the same file name, replace the old file, and click 'Refresh All' in Excel.
WPS Office Data Comparison

Easily Convert and Compare PDF Data using WPS Office

WPS Office features a powerful built-in PDF toolkit that allows you to seamlessly convert PDF trial balances into Excel format in just a few clicks. You can then use standard lookup formulas to compare your financial data efficiently without dealing with complex Power Query setups.

  1. 1. Open PDF in WPS Office: Launch WPS Office and open your trial balance PDF file directly in the application.
  2. 2. Convert to Spreadsheet: Navigate to the Tools tab on the ribbon and click 'PDF to Excel'. Confirm the language and page range, then click Convert.
  3. 3. Compare Your Data: Open your original spreadsheet in a new tab within WPS Office. Copy the converted data over and use VLOOKUP or Conditional Formatting to identify matching payment IDs.
Built-in, highly accurate one-click PDF to Excel conversion.Full compatibility with Microsoft Excel (.xlsx) formats and standard formulas like VLOOKUP.Lightweight and fast, perfect for quick financial data reconciliation.Intuitive tabbed interface to view your PDF and spreadsheet side-by-side.
QA img-9

Frequently Asked Questions

Why does my PDF data import into Excel as a single column?

This usually happens if the PDF is scanned as an image or lacks structural formatting. To fix this, you can use the 'Text to Columns' feature in the Data tab, or preferably, use an OCR-enabled PDF to Excel converter to accurately extract the table structure.

Can I highlight differences between the two lists automatically?

Yes. Once both lists are in the same spreadsheet, select both columns of payment IDs. Go to Home > Conditional Formatting > Highlight Cells Rules > Duplicate Values, and change the drop-down from 'Duplicate' to 'Unique' to immediately highlight non-matching IDs.

What if my PDF is password-protected?

Power Query cannot extract data from an encrypted PDF. You will first need to open the PDF in a PDF viewer, enter the password, and either save a decrypted copy or print it to a new PDF file before importing it into Excel.