Hello I want to make a robot that can perfrom this in those steps

  • Create a new excel sheet
  • Go into a folder ( containing different folders, that again contains some pdf files)
  • Go into one of the subfolders and then go into the pdf file grab some data from the pdf file.
  • Go back into the excel and copy the information into the excel under certaint titles
  • Do the same for the other pdfs
  • Go into next subfolder and perfrom the same action above
  • Send the excel sheet on email, then delete it


First try the steps and let us know if you face any issues and then we can help you.

1 Like

Well its there a function that will open excel and create a new file for you ? Or do i have to make the excel sheet first ?


Use Excel Application Scope Activity and in properties click Create File option. If file is not there then it will create new file.

ok, so i will just name the folder path where it shall look ?

Like this ?

You can also use Write Range Activity since it creates empty file if file does not exist

what shall i set in the input field then?

Something like this.
If you are not sure, i suggest going back to Foundation Course 1 on Ui Path academy



No need to use Create File Activity here. Just Specify the file name along with the folder path.

In the properties of Excel Application Scope Activity, check Create File option.

Ok thanks let me try

1 Like

there its no place to set name in the excel app scope, shall i set a ouput on the workbook ? and use it in the write cell ?

want the setup to be like this when it shall write the excel, then under each of those tabs it will put certaint values extracted from the pdf

I have made a build data table activity, that holds my headers

Now i need to insert my extracted strings from the pdf into those heards at the right place, so my branch string would go to the first one then so on. How can i perfrom it ?


Read the values from pdf file and store it in a corresponding variable and then use Add DataRow activity to add to dataTable.

ArrayRow: {varBranch,varInsurance,varDmgDate,…}
DataTable: DT

Where, DT is build datatable activity output.

It only created the excel sheet, but its all empty


Don’t put all those things inside the loop. The flow should be like this:

  1. Build DataTable
  2. For Each loop
    • Process one by one file
    • Add DataRow activity
  3. Excel Application scope
    • Write Range activity to write that data into excel file and pass that dataTable.

so should i put the excel scope outside of the each loop, then only keep my extract data inside the each loop?


Yes keep it after the for each loop and no need to loop it again. Once all iterations done then it will come to Excel application scope and here use Write range activity to write into excel file and provide that output dataTable.

Think i am doing something wrong here. Ok so i have first one sequence with build data table

Here i have added the columns and output dt

Next i have a for each loop that goes through all of my folders then another for each going through each file and extracting data ( this works perfect )
then at the end of the for each loop i have the add data row with dt as Datatable and with those variables in the array row

outside of for each loop at the very end i have the excel app scope with write range
in workbook path i have stored a variable with my folder path as string
then in datatable the DT
Starting cell β€œβ€
and sheetname sheet1

Its still not working so i have done something wrong