PDF Regex into Excel

Hi, I would like to read pdf and use regex to generate specific information (like the names and phone numbers) inside different pdf in a folder. Then, insert the names and phone numbers row by row for each pdf inside the folder.

I have successfully read pdf text and used regex to output the information using the write-line activities.

However, how can I output these information into Excel row by row for different pdf files in a folder?

@cclemon

create a datatable using required columns you need using build datatable

then use add data row activity and add the rows to the datatable after extraction

at the end use write range/append range

if you want to write to excel directly then use write cells and keep the counter

or create a datatble with single row and use append range in loop

cheers

@cclemon after extracting the data use build data table and create header inside it if you want to add headers in your excel after this save this as dtoutput and then use add data row activity pass the string extract variable and pass the datatable of builddatatable variable
The image depicts a workflow in UiPath involving steps to build a data table, add a data row to the data table, and write the data table to an Excel workbook on "Sheet2". (Captioned by AI)

hope this image helps to understand the concept
cheers Happy Automation

I successfully used the build data table, add data row and write range activities to create the header.

However, it seems that only the values from the latest PDF are inserted into Excel. (Maybe the latest one covers the other pdf values).

I used the for each file in folder activities. How can I make the values to different rows instead of covering them?

@cclemon

I guess you used build inside loop …use it before loop…and add data row in loop

cheers

@cclemon

if solved can you please close

cheers

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