Flow decision for checking empty rows of excel sheet

i’ll open excel sheet after that i want to use flow decision to check if row is empty it should fill the data or if it is filled it should go to next step of execution…so can some one send me what condition should be used in flow decision in such senario.

Hi @Tanvee_Azmee

condition in If → Not row(0).ToString.Equals("") can be used to check if the row is empty

Hi @Tanvee_Azmee

Try using a filter data table activity to remove all the empty rows. and you can process each of them in for each

Hi @Tanvee_Azmee

The condition to figure out if an entire row is empty in a datatable. Start looping your datatable using a For Each Row activity.

Put a if condition inside the For Each Row activity to check if the row is empty. Set the condition to:

String.IsNullOrEmpty( String.Join("", CurrentRow.ItemArray) )

You can also print the rowindex of the empty row inside the if condition provided you have the below setup:

image


In case you want to filter out the index of all the empty rows in your datatable:

Create a variable EmptyRowIndexList of the type:

image

Use an assign activity and set the EmptyRowIndexList variable with the below Linq Query:

( From row In your_datatable_variable.Select()
Where String.Join("", row.ItemArray) = “”
Select your_datatable_variable.Rows.IndexOf( row ) ).ToList

This will give you the index of all empty rows.

tq for giving solution

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