Help with PDF to Excel process (edited)

Hello folks,
I am very new to UiPath as well as programming. I watched a few videos, but I didn’t learn very well from those, I would greatly appreciate any assistance you could give me. My goal is to read a PDF file, extract specific information and then put that information into an excel spreadsheet. I was able to read the PDF (thankfully UiPath makes that part easy), and grab some information using this pattern I found on another post “(?<=” + label1 + “)(.*?)(?=” + label2 + “)”, but I am currently having trouble with that part and don’t really know how to approach it.

The current problem is that while I can get the information I want, I don’t understand how to repeat the process to find more of that information. I have inserted a DoWhile, but it keeps giving the same information instead of looking for more.
Also, I don’t like my current method of finding the information and would be happy to hear any other suggestions.

Here is my file: File

Edit: (Couldn’t find an edit button so I deleted and reposted) I fixed and obvious error, my readfile command was in the DoWhile process, but even after changing that it’s still not working.


Ok @GDriver - First thing first You are able to get the data successfully using UiPath great now.
Now you are talking about some pattern that is actually regex (?<=label1)(.*?)(?= label2)
It will give you the data between label1 and label2.
Let’s take an example
Suppose there is a string Hi! My name is Anmol, then Regex (?<=name)(.*?)(?= Anmol) will result only is i.e in between the text of two words.
Hope it will help you.
Now how to implement that.
Here is an example.

For first match use yourresult.CastOf(Object).First.ToString it will return the first match.


1 Like

Thanks for your response anmolk17!

I don’t think I was very clear in my question, or I am misunderstanding your response. I am able to use that step, but when I run it in a loop (or DoWhile) I get the same information when I want it to move on and get information past that.


The spot the second arrow is pointing to should have (B101 SANDWICH / SALAD PREPARATION REFRIGERATOR) instead of repeating the (B100 INDUCTION RETHERMALIZER).


I figured out my problem. I needed an “For Each” activity since my variable type was an "image ".

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.