How to Compare a PDF Trial Balance with an Excel Spreadsheet
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.

- 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.
Ensure your PDF trial balance contains selectable text and properly formatted tables for a smoother data import process.
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.
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.
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.
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.
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.

Convert PDF to Excel and Compare Using Lookup Formulas
If you do not have access to Power Query, you can convert the PDF to an Excel file first, and then use VLOOKUP or XLOOKUP to compare the lists.
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. Open PDF in WPS Office: Launch WPS Office and open your trial balance PDF file directly in the application.
- 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. 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.

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.




