Append Range is not working after clearing existing data

Hello Guys,

I hope everyone is having a good day, i need ur help,

i am using append range activity to append the values in excel. it was working before now it behaving different. if delete the previous entry in excel , new entry should have to be in the deleted row but it is appending in new row.

for example

@Palaniyappan

1 Like

Hi @c_prabhu ,

Welcome to UiPath community!

Alternate approach to do this is to get Last row of excel and then use read range.

For ex - Last row is 10
You have to pass Address as “A”+ lastrow.ToString + “:” + “W” + lastrow.ToString in read range activity.

Hi @c_prabhu

Welcome to the community…
When you deleted the previous data, did you only clear the data or did you remove the entire row on excel?

Clearing the data may not work all the time. Hence we need to delete the row.

Or else

Try copying the data into a new sheet and delete the current and try appending on that to see if it works

I have mapped that particular row to another sheet so if i removed that entire row the formula in another sheet will wipe off.
so i can’t delete entire in this case. can u pls suggest any other option.

Hi @c_prabhu

Welcome to uipath community

Considering the above can we try to create a new file every time with nee value in the same row where we expect to be
And at the same time the old files can be deleted the moment when new file is created

The reason is as you weren’t able to delete the entire row it will obviously create the next record in a new row only

Unless the row is completely cleared and emptied before trying to append, it will be creating in new row

But you mentioned that it was working fine earlier
I would like to know the steps used to append rows
If possible can u pls tell us the sequence of activities you were using

Cheers @c_prabhu

1 Like

Every day i ll be generating 48 Rows at a particular time interval, at the end of the day clear all the values from sheet and start to append 1st row from next day.

but issue is after deleting 48 rows manually, it have write in first row but it writing in 49th row. leaving all 48 rows as blank.

1 Like

Perfect
So if that is deleted manually delete in this way
Once after deleting the records
Press ctrl+a and press delete
This will ensure that sheet is clean and when bot is using next time it will surely write from first row

Cheers @c_prabhu

Hi @c_prabhu ,

I have also faced similar issue in past.
When we use to clear rows the append activity not worked in the similar way.
So better yo delete all rows and then use append activity.

You can try below code, let know if you face any issue.
DeleteRowsinExcel.xaml (5.2 KB)

You have to pass your file name and sheet name to the arguments of invoke code.