how do i extract data from a pdf file using power query in excel?

Occasional Contributor

hi team,


Please i would like to find out if there is a way to extract data from a pdf file using power query in excel?



10 Replies


If you are on Windows, on Excel 365 and not on semi-annual channel you shall have this connector


Perhaps these days availability bit wider, not sure. But in any case that's for subscription model. there is no ad ins i can install to access this with 2019 version?


Copy/paste the following code in a new blank query using the Advanced Editor

    Source = Record.ToTable(
    SelectedTypeFunction = Table.SelectRows(Source, each [Value] is function),
    RemovedValue = Table.SelectColumns(SelectedTypeFunction, {"Name"}),
    SortedByName = Table.Sort(RemovedValue, {{"Name", Order.Ascending}})


then load the result of that query on a sheet. If you find Pdf.Tables in column [Name] the function is available in your version of Excel/PQ. Per its name the function is looking for table(s) in the PDF...

hi Lz!
I saw Pdf Tables in column name after loading the code, how then do i locate it.
Thanks for the feedback.


Given you don't have the corresponding wizard in Excel user interface, you have to code it yourself. You start with a new blank query and in the formula bar, something like:

= Pdf.Tables(File.Contents("FolderPath\Example.pdf"), [Implementation="1.2"])

Then, assuming the function finds a Table in your PDF, click on it in the [Data] column:



NB: re. [Implementation=x.y] the Pdf.Tables doc. says:

  • The newest version should always give the best results
    I've seen a couple of cases where this wasn't true so you have to test what gives you the best result based on your PDF
  • Valid values are "1.3", "1.2", "1.1", or null 
    1.3 isn't avail. yet. Please refer to DanielPerelman's reply on this thread

please this is what i get trying to implement for 1.2. the other values are giving me invalid answers

Carefully read the error message you get, it clearly indicates what the problem is. I checked the formula you entered and it's OK (no syntaxt error nor anything like that)

@L z. 

Small comment, 1.3 is available now. Not sure about exact PQ version.

On Current Channel v2106 b14131.20278 (latest Click-to-Run) "1.3" is still not avail.
(Same goes with PBI Desktop v2.94.921.0 - June 2021)
If you have it on the Insider Channel it should land here in a few weeks...

@L z. 

Yes, that's PQ on insiders channel.