Data from .pdf with varying pages and inconsistent format.

noveske

Board Regular
Joined
Apr 15, 2022
Messages
120
Office Version
  1. 365
Platform
  1. Windows
  2. Mobile
  3. Web
The .pdf varies from 1 to 2 pages. .pdf format is consistent.
When selecting source, the query is inconsistent. When the pdf is filled in the last column, it's random which ones are copied or, then instead of placing the data in the right cell in PQ, it will add it to the end of the _______________. It doesn't copy all even when all fields are filled.
Hiding null rows and manipulating it to be what I need is easy. I've been doing it as separate queries. Then combining them after cutting everything I don't need out. I only need 5 of the columns.

Could parameters to be set to only pull specific columns containing specific data types then instructed to query to specific columns?
Column 1: Last Name, First Name separated by the comma. Last, First
Column 2: 6 - character letter and number combination. (XX0000)
Column 3: Usually 1-2 characters - Letter - Number - 3 Numbers - 2 Numbers. ( X-X-0-000-00)
Column 4: 1 or 2 words.
Column 5: 10-digit number.

Just gets thrown off when the file is replaced and then refreshed. Even though the .pdf is the same format every time.
1693703289001.png


So sometimes it will pull 10 columns, others 11.
Column 6 and 7 on the .pdf are blank or have a value. This is just random.

How would I make it into one query so when the file gets replaced, I can just refresh it to pull what I need?
When I set it up, it works. But then after updating the original file which is the same format each time, something shifts.
Key mismatch error. I get why it's erroring, but can't find a solution.

PQ, Table001: Column 6 is just added. No header. Not even there on the .pdf. When there's only 1 page and I update the .pdf, PQ will show it sometimes.

1693703135287.png
 
Last edited:

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.

Forum statistics

Threads
1,215,069
Messages
6,122,958
Members
449,096
Latest member
Anshu121

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top