Active Member
January 30, 2021
Good day at All
First time here "officially" greetings to the forum owners and all the users.
I have been working for a while trying to solve the issue that I'm facing without luck, wondering if it has a solution or not.
I will try to explain the best I can:
- I receive on a daily basis a PDF file that contains a simple table that needs to be cleaned, I implemented it with PQ without any problems.
- Now the issue is that the table could be on 1 page or multiple pages (the number of pages changes every day).
- I know how to implement the pdf reading/processing for 1 page, 2 pages, 3 pages, but evidently, all are different implementations.
So the question is:
How to implement the solution with PQ for a variable number of pages? ... it this even possible?
I will appreciate any tips that you can provide.
Thank you
Miko
July 16, 2010
Hi Miko,
Welcome to our forum!
The Pdf.Tables function has a parameter for multiple pages. Have you tried setting this to TRUE?
Mynda
New Member
December 9, 2020
I may have a solution but it's ugly. Interesting this question is here! I was going to start a thread looking for comments to this tech article I'm writing on Medium. A problem you'll face, at least I have, is the integration, or lack of integration between Power Query and Excel (VBA). I explain in the article.
Does anyone have a real, or better, solution to the wait problem between Excel VBA and Power Query? I learned the dummy wait trick on this forum, sorry I forgot who. However, I can only get this process working by using both that trick and the "sleep" kludge.
https://docs.google.com/docume.....sp=sharing
Here is the latest Excel workbook and sample files
https://drive.google.com/file/.....sp=sharing
Thanks!
Max
Active Member
January 30, 2021
Hello Mynda
I was reading the syntax of Pdf.Tables function and the description say the "TRUE" is the default value if omitted... now, to tell you the true I'm very new to PQ therefore even when I tried to explicitly declare it I have failed completely.
This is part of the code that I'm using
FilePath = Excel.CurrentWorkbook(){[Name="FilePath"]}[Content]{0}[Column1],
FileName = Excel.CurrentWorkbook(){[Name="FileName"]}[Content]{0}[Column1],
Source = Pdf.Tables(File.Contents(FilePath & FileName), [Implementation="1.1"]),
Table002 = Source{[Id="Table002"]}[Data],
The lines in bold are causing me a lot of trouble... no idea how to define the "options" mentioned on the documentation
If it is possible I will appreciate a little help
Thank you
Miko
Active Member
January 30, 2021
Good day Mynda
Here is the link with the solution that solved my case... implementing it was a breeze, and I learned a few valuable things in the process
https://community.powerbi.com/.....m-p/687409
Note that I didn't use the Start Page & EnPage parameters at all, because in my case those were not needed
Hope this helps others.
Miko
Answers Post
The following users say thank you to Miko Siko for this useful post:
Mynda Treacy1 Guest(s)