Append to an excel cell

Hello guys,

i have some pdf’s in a folder and iam taking the name of that pdf using for each loop,

now i want to add that name of that pdf to an excel column,

so each time new pdf are added it should append to the excel column,

This is the pdf folder,

This is how i take the name of the pdf’s

In the “Reference No” column i want to append the file name for each run.

image

Can i get a solution for this.

@Gokul_Murali,

  1. Build datatable outside of the For each loop with all four columns.
  2. Inside the loop, add Add Data Row activity to add row to datatable we built in step 1 and pass the array as below:
New Object() {filenameVariable,"","",""}
  1. After foreach loop, Append range activity to write the datatable to Excel file.

Thanks,
Ashok :slight_smile:

Hi @Gokul_Murali

Check the below thread,It contains Zip file which helps you out to solve

Hope it helps!!

@Gokul_Murali

Use Write cell Workbokk Activity.
Intialialize a variable Counter and pass in the cell

Hope it helps!!

But this will not append in excel right if i add new pdf in the folder it will replace the already occupied cells.

Bro can you please elaborate if possible

@Gokul_Murali

Use append activity instead of Write cell