There are around 30 pdf files I want fetch the amount from the each file, if the pdf is not contain any amount then i need to ignore that pdf file, if the pdf contains amount then i need to take the amount and write into the excel file.
Can anyone please help me to solve the above automation.
Thank you in advance.
Can you send the sample pdf? or just send the image of the amount in the pdf file
A simpler approach is to read PDF files using https://docs.uipath.com/activities/docs/read-pdf-text and check if required text is present or not using
If amount is a number, you can make use of Regex for searching amount.
Saranya K R
The general structure you can solve ur issue is
- Use assign actity to get the list of all pdf files in that folder using assign activity
- use Build datatable with required columns where u need to add amount data and store dt1 datatable variable.
now use for each to loop through each file (for file in file_list ) with type argument as String
inside it use the below activities
a. Use Read PDF activity to read the pdf and store in string input_text
b. U can use isMatch or contains method to validate whether the amount is present there or not
c. if the above expression is true, then extract the amount data by using Regex or string manipulation and store in datatable using add datatrow activity to add amount data in dt1.
d. if the expression id false, then use continue action to skip the current iteration and move to next one.
Hope it helps
Mark it as solution if it solves ur query
Here is a sample Template
PDF.xaml (6.6 KB)
Let me know if you need help
please find the attachments
Can you able to send the sample file? for extracting the amount from the Pdf file
Whether the marked one remains constant?
@Gokul001 its not constant.
For each session there will be 2 files
Presentation(presented column) File
Return(received) Settlement File.
File name with _R is a return settlement file and file without R is the presentation file.
ACHCR is credit Settlement file and ACHDR is debit settlement file."
Can you able to send sample text file with a preserved format
There is no text file , I have pdf and master excel. May I please which text file you are looking for??
What value i want to extract from the file can you please tell
Above values which are under presented, received , net bilateral respectively
Sorry for the inconvenience
Here is the sample workflow
PPdf.txt (672 Bytes)
Regex.xaml (7.4 KB)
Let me If you face any issues.