I have been searching the forum for a few hours and I cannot solve a data comparison problem.
Background
I use document understanding to extract data from a pdf file
One column of the data set includes a phone number
The phone number is found in the file name, which I need the full name in order to carry out my excel manipulation
Issue
After hours of searching it did not appear to be possible to include the PDF file name in the excel output during the document understanding data extraction process
Question:
Could someone help me identify a solution to add the full pdf file name to the corresponding document understanding output row in excel?
Idea 1: If it is possible to add the file name during the document understanding process this would be the easiest option
Idea 2: The next option in my mind would be to build a list of file names and an excel list, then for each row in the excel list, if the file name matches the phone number record the file name in the excel file
If either of these ideas would work, I am having trouble executing them and could use some help.
Hello,
You can do it by getting the list of files as an array of strings using Directory.GetFiles command and then check if the array contains the phone number using an iterative loop.
I have created an example where you can the bot goes through the numbers in each row of the excel sheet and then checks if any of the pdf files contain the phone number. Please have a look and do let me know if you have any more queries.