How to achieve this

I have the to add to rows to excel without overwriting the existing rows using write range workbook activity in UiPath! Can anyone help in solving this?

can you explain it step by step

Hi @Kancharla_Mahija

You can use the Add Data row activity to add the row to the existing datatable.

→ Use read range workbook activity to read the excel and store in a datatable
→ After read range workbook use the Add Data row activity to add the row to the existing datatable.
→ In the ArrayRow provide the values that you want to add for each cell by using array Ex:({“Mahesh”, “Lakshman”, “Varun”})
→ In the Datatable field provide the field that you have created in read range workbook activity.
→ After all, use the write range workbook activity to write the datatable to the excel.

Check the below image for better understanding,
image

Hope it helps!!

when using append range activity its repeating the entries in next row

@Kancharla_Mahija

If all the data is always present in the datatable then just use write range it will write the old and new data

if only new data is present use append range

cheers

Hello @Kancharla_Mahija
Try this

  1. Use Build data tabel and create the column Structure as your requirement.
  2. Use Add data row activity to add the values in the Datatable (Variable from Build datattable)
  3. Use File exist activity to find the output file is exist or not.
  4. Using Boolean variable from File exist, can create the If condition .
    4.1 Then —> Append workbook activity
    4.2 Else → Write wrange workbook activity.
1 Like

Hi @Kancharla_Mahija

If you dont want to overwrite the data Use the AppendRange Activity and use AddDataRow Activity to add your values to the new row