How to delete a blank rows in excel

How to delete the blank rows in-between the cells contains value

Hi @sivakumar.poosaipandiyan
Welcome to UiPath Community :slight_smile:

You can read the dataTable and then delete empty rows from this datatable and then write the new datatable again in Excel.
To delete the empty rows, there are several methods. They are explained in these videos:
Video 1: UiPath | Remove Empty Rows From DataTable #1 | How to remove empty rows from Data Table with VB.Net - YouTube
Video 2: UiPath | Remove Empty Rows From DataTable #2 | How to remove empty rows from Data Table with Filter - YouTube

You can also delete empty rows with LINQ:
Add Assign activity:
dt2= dt1.AsEnumerable().Where(Function(a) a(columnname).ToString.Trim<>“”).CopyToDataTable

Best regards
Mahmoud

2 Likes

Hi @sivakumar.poosaipandiyan ,

You can use VBA code to remove empty rows.

1 Like

Hi ,
Here is the package that has an activity called “Delete empty rows”. It may help you to remove the empty rows.

Regards
Balamurugan.S

2 Likes