Even though we applied a filter to eliminate the non-PDF files from the folder examination, the process only worked because we got a bit lucky.
Remember how the Microsoft Word document appeared at the bottom of the metadata list?
If we add a Microsoft Excel file…
Refreshing the query shows the newly added filed at the SOURCE step.
The new Excel file appears at the top of the list because of the alphabetical sorting by filename.
Of course, we added a step to filter out all non-PDF files.
Unbeknownst to us, another query that was created for us named “Sample File” is selecting the first file in the metadata list of files for examination and processing.
When the query was created, the first file in the list was a proper PDF file.
Now the metadata list shows the Excel file as the first file.
The “Sample File” query performed its folder scan, independent of the original query’s folder scan.
This causes the “Transform Sample File” query to fail because it is attempting to perform PDF transformations on an Excel file.
Correcting the Error in the Sample File
To correct this issue, we need to apply the same filter step to the “Sample File” as we did to the main query.
Select the SOURCE step of the “Sample File” query and perform the same filter operation as earlier.
Close & Load the updated queries back into Excel.
All is well with the world, once again.