Read PDF and Extract Text to Excel using Regex

I would like to extract specific information to Excel from pdf using reg ex.

However, how can I insert the regex formula in UiPath Studio? And how can I set the output to Excel?

I tried to use the activity Regex builder but it doesn’t work. Can anyone screenshot the workflow activity? Thank you very much.

Hie @cclemon for this process you have to use these activities
1- if you are working with single pdf you can directly use read pdf activity and if you are working with multiple pdf in a specific folder you can use get file from the folder activity and inside that pass the read pdf activity after that you can use assign activity and do some RegEx or string manipulation to extract specific data from the pdf. and to write that data into the excel you can use build data table for storing the data into the table format and use add row activity and pass the string variable and the datatable variable to that activity and finally use the write range .
cheers Happy Automation

Hi @cclemon welcome to UiPath community ,

To insert/use regex expressions you can use assign activity like that :

variable=System.Text.RegularExpressions.Regex.Match(“inputString",“Regex”).Value

and to write results to excel file you can use “UiPath.Excel.Activities”. For the case you mentioned, you can review this process
ExtractPdfToExcel.zip (185.1 KB)

These are some useful topics that can you review :

Regards.

Hi @cclemon ,
Refer this link you’ll get some idea.

2 Likes

Hi, I have successfully output the numbers by the write-line activities.

However, how can I input it to Excel row by row for different files in a folder?

@cclemon

Please check

cheers

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