Forum Discussion
Importing Data from folder with PDFs - Missing Page 4 on one of the files causing error
I have 19 PDF files in a folder and am attempting to import page 4 from all of them. File 19 does not have a 4th page and is causing this error.
Is there a way to get Power Query to "ignore" the files that are missing this page? I plan on adding additional PDF files to the folder and am sure that this error will continue when the page is missing.
Thanks,
It looks like you may be combining files from a folder, using a custom function. My response below is based on that assumption. If that is not the case please let me know and I will revise. On the query that combines all of the files you should see a step named something like #"Invoke Custom Function". If you click this step and scroll all the way to the right you should see the column that contains all of the results from your transformation function. In this column, you should also see errors, should they exist. You can click on the column and then on the ribbon Home > Reduce Rows > Remove Errors. This will remove all of the rows, or file per se, that have errors. It is advisable, however, to have a version without errors as just described, and then an error log, so you can debug should you wish to do so.
4 Replies
- jennratten
Super User
It looks like you may be combining files from a folder, using a custom function. My response below is based on that assumption. If that is not the case please let me know and I will revise. On the query that combines all of the files you should see a step named something like #"Invoke Custom Function". If you click this step and scroll all the way to the right you should see the column that contains all of the results from your transformation function. In this column, you should also see errors, should they exist. You can click on the column and then on the ribbon Home > Reduce Rows > Remove Errors. This will remove all of the rows, or file per se, that have errors. It is advisable, however, to have a version without errors as just described, and then an error log, so you can debug should you wish to do so.
- Kpetersen15Regular Visitor
This worked great, Thanks!
- jennratten
Super User
You're welcome!
- Kpetersen15Regular Visitor
I'm making another similar file to this. It is not showing me any errors in the data now, but when I attempt to load the data to the sheet, it is showing the following errors.