How to delete Last Row in excel with dynamic Range?

How to delete Last Row in excel with dynamic Range?

Hi @W_QW

The easiest way to get the last row and delete it in an excel sheet is by using the UiPathTeam.excel package you will find in manage packages like the image below :

After that you just need to get the number of the last row and then point on it and then delete it this way you can dynamically delete the last row :

You will find everything in the following zip file :

Decompress it under Documents\UiPath and you should be good to go :slight_smile:

DeleteLastRowExcel.zip (16.6 KB)

This is the easiest way because you don’t have to deal with DataTables or anything.

Regards,
Reda

1 Like

Hi @W_QW

Read whole excel store output in datatable

LastrowNumber = Datatable.rows.count+1

Now you can delete dynamically :slight_smile:

1 Like

@rahatadi With which command can I delete dynamically after assigning the lastrownumber ?

Use Insert/Delete Activity from that extensions list

1 Like

Thank @sarathi125