How to Standardize Inconsistent PDF Columns in Excel Power Query
Question details
The user needs to import multi-page or multi-month PDF credit-card statements into Power Query but is facing issues with misaligned data.
- Product
- Microsoft Excel (Power Query)
- Device & OS
- not provided
- Scenario
- Importing PDF credit-card statements that contain varying table layouts and structures across different pages or billing months.
- Observed behavior
- Power Query imports varying numbers of columns and inconsistent data due to the structural differences in the PDF tables, making appending and analysis difficult.
Ensure you have the latest version of Excel installed, as Microsoft frequently updates the Power Query PDF connector to improve table recognition. Gather a few sample PDF statements to identify where the structural variations occur before building your query.
Apply Custom M Code and Consult Community Solutions
Because PDF structures can vary wildly, standardizing them usually requires combining files, applying manual query transformations, or using custom M code.
The Power Query PDF connector relies on spatial layout to identify columns. When a statement's layout shifts slightly from page to page, Power Query interprets this as a new column structure.
To resolve this, you will need to bypass the direct load and use the Power Query Editor to manually align the data.
Instead of clicking 'Load' when importing your PDF, select 'Transform Data' to open the Power Query Editor.
Utilize transformation tools such as 'Unpivot Other Columns', 'Remove Empty', or 'Fill Down' to normalize inconsistent rows before expanding your tables.
Check Microsoft's official Power Query PDF connector documentation for baseline capabilities and limitations regarding table extraction.
If the structure is too complex for standard interface buttons, post sample data (with sensitive information removed) on the Microsoft Power Query community forums for specialized M code help.
Try WPS Office for Your Spreadsheet and PDF Needs
While complex Power Query M-code transformations are specific to Microsoft Excel, WPS Office offers a lightweight, completely free alternative with built-in PDF to Excel conversion tools that handle everyday statements easily without coding.
- 1. Open WPS Office: Launch the WPS Office desktop application and navigate to the 'PDF' tab.
- 2. Select PDF to Excel: Click on the 'PDF to Excel' tool and choose the credit card statement you want to extract data from.
- 3. Convert and edit: Let the built-in conversion engine extract the tables into a clean spreadsheet, then edit or merge the data directly in WPS Spreadsheet.

Frequently Asked Questions
Why does Power Query split my PDF tables into multiple columns?
Power Query relies on invisible layout boundaries within the PDF. If the text spacing or margins change slightly across pages, the connector interprets this as a new column layout, resulting in misaligned or extra columns.
Can I merge inconsistent PDF tables automatically in Excel?
There is no single one-click solution if the columns differ fundamentally. You must use the Transform Data editor to standardize column names, remove nulls, and append the queries manually.
Does WPS Office have a tool like Power Query?
WPS Spreadsheet focuses on standard data analysis and includes powerful built-in tools like PivotTables and seamless PDF-to-Excel conversion, though it does not use the M-language Power Query engine.




