I have attached a sample PDF that I am working with. Im trying to export the information to a excel sheet. I need split the information up in 2 columns. any ideas on how to accomplish this?
PDF Example.pdf (62.0 KB)
Hi @NATHAN_MORA
First you have to install UiPath.PDF.Activities Packages
then read your pdf with read pdf text activity and store the output variable like Str
Drag and drop the matches activity and choose dropdown as Advanced and paste the regex **[A-Z]{2}\d{9}**in value tab for first column
use another matches activity for column 2 and paste the regex as ((?<=\s)\w+(?=\s0)) in value tab
create a output variable for matches activity like RegEx_Out1 and RegEx_Out2
enter input string as read pdf text activity output variable
Build a datatable for output excel and create two columns using build data table activity
and create a output variable as Out_DT
and convert both the matches activity variable into array ExRegEx_Array1=RegEx_Out1.ToArray
find the count of the array variable
using Count1<RegEx_Array1.Count
use while loop to iterate each row and set condition as i =Count1 where i is Int variable
Drag and drop the add data row activity inside the while loop
and pass array row value as {RegEx_Array1(i),RegEx_Array2(i)}and datatable as Out_DT
use write range activity outside of the while activity to print write the output and pass Out_DT variable
Hope it solves your issue
Update whether you got your desired solution or not
thanks
Robin
Robin,
Thanks For the response, not sure how to convert to array. I
Could you provide a workflow?
Hi @NATHAN_MORA
Please find the attached overall project
I developed a project as per your requirement and I also share output file with you
Pdf.zip (31.9 KB)
Output.xlsx (8.4 KB)
Hope it solves your issue
Update us whether you got your desired solution or not
if you got your desired solution can you mark it as solution
Thanks
Robin
This will put me on the right track, Thank you !
your welcome
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.