Remove Empty Rows

Hello,

I have this excel as shown below:

And I need to remove these empty rows in between my data so that it looks like this:

Can anyone help, please?
Thanks!
New Microsoft Excel Worksheet.xlsx (9.2 KB)

use activity filter data table

I how the activity but what is the settings?

Hi,

First you get the datatable by reading the excel. Afterwards, you can delete the empty lines with the filter activity and write them back to excel.

If you have problems while developing, please let me know.

Regards,
MY

Use this in an assign activity
Read range the sheet to a variable name DataTableName
where DataTableName is the datatable variable

DataTableName=DataTableName.Rows.Cast(Of DataRow)().Where(Function(row) Not row.ItemArray.All(Function(field) field Is DBNull.Value Or field.Equals(""))).CopyToDataTable()
Write the datatable in an excel using write range

Hi,

After reading the table, you can filter as in the image.

Regards,
MY

Screenshot (207)

Hi,

I hope it works for you.

RemoveEmptyRow.xaml (7.3 KB)

Regards,
MY

1 Like

Thanks a lot!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.