Forum Discussion
Bridgett_B
Feb 29, 2024Copper Contributor
Power Query import using relative path of PDF file error
Hello, I have a query that currently imports a pdf file based on a specific file name and location. I'm trying to make the file name and location relative but keep getting an error. I'm using Exce...
- Mar 01, 2024
The first three lines of M-code should look like this:
FolderPath = Excel.CurrentWorkbook(){[Name="FolderPath"]}[Content]{0}[Column1], PCRFileName = Excel.CurrentWorkbook(){[Name="PCRFileName"]}[Content]{0}[Column1], Source = Pdf.Tables(File.Contents(FolderPath & PCRFileName), [Implementation="1.3"]),
Now you can navigate to the table(s) you want to extract from the PDF.
Riny_van_Eekelen
Mar 01, 2024Platinum Contributor
The first three lines of M-code should look like this:
FolderPath = Excel.CurrentWorkbook(){[Name="FolderPath"]}[Content]{0}[Column1],
PCRFileName = Excel.CurrentWorkbook(){[Name="PCRFileName"]}[Content]{0}[Column1],
Source = Pdf.Tables(File.Contents(FolderPath & PCRFileName), [Implementation="1.3"]),
Now you can navigate to the table(s) you want to extract from the PDF.
- Bridgett_BMar 05, 2024Copper Contributor
That worked perfectly! Thank you!Riny_van_Eekelen