How to prevent data overwriting in UiPath?

Hi all,

I have a sequence done that is already working, the only issue is if i rerun it again, the new data will overwrite my old data, which activities can i use to solve this, and how can i solve this?

Please give detailed explanation as i am very very new to UiPath.

Then please also give a detailed problem description.
If you seek help from the community on your problem, give a proper example please.:

  • what activities (in detIail) are you using now
  • what is the current result
  • what is the desired result.

Maybe post part of your current solution as well, assuming you can make your data anonymous

Hey @E.Y.9

If you want to clear previously executed data then I would suggest you to use clear sheet activity first then use write range activity.

If not then you give a dynamic output file name in write range activity.

“Output_”+ Now.ToString(“dd_MM_yyyy_hh_mm_ss”)+”.xlsx”

Using above query whenever you execute your code bot will create a new excel file with respect to current time!

I hope this will resolve your issue!

Best regards,
Ajay Mishra

Hi Jeroen,
I’m working on a sequence to extract email details such as Title, Date, Subject, and Attachment Details, and write them to an Excel file. I’ve attached a screenshot showing the Excel headers and the populated details.

Currently, the results are being written correctly. However, when I rerun the sequence, the new results overwrite the data from the previous run.

What I want is for the new results to start from the next empty row, without overwriting the existing data.

I’ve tried using the append function, but it causes the data to loop and repeat multiple times, resulting in duplicates.
Below are screenshot of my sequences, there are many repeating activities, I hope you can assist me.


@E.Y.9,

Instead of writing individual cells, you can create a datatable, add the data you want to append into the excel file as data row in it.

Once this data row is ready, use Append Range activity to write the data to excel file. This will write the data at the first blank row in the file.