Forum Discussion

marcodea's avatar
marcodea
Helper II
7 years ago
Solved

PDF Connector: table on multiple pages

I'm trying to import data from a PDF file, but a table bigger than one page is imported in Power Bi as multiple tables. Is there any workaround?    
  • v-juanli-msft's avatar
    7 years ago

    Hi marcodea 

    I make a test for your scenario:

    I have a pdf with a large table in 23 pages (from page 1 to page 23),

    1.open Edit queries, create a new blank query, 

     

    2.open its Advanced editor, write the code

    let
    Source = Pdf.Tables(File.Contents("C:\desktop\case\5\5.10\date.pdf"), [StartPage=1, EndPage=23])
    in
    Source

     

    3.Expand "Data" column

     

    4.Filter "Kind" column to keep only "Table"

     

    5.Then we will get all data in one table

    I could remove some useless columns,keep only last two columns, then "Use the first row as headers"

     

    Best Regards
    Maggie

     

    Community Support Team _ Maggie Li
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.