Check if next empty cell

@trunghai

if i understand correctly, you want to check if there is any empty cell in given column ?

1 Like

You may have to use while loop for this.

dataTable.Rows®.Item©.ToString

r - row number, starting from zero
c - column number, starting from zero

1 Like

Hi @trunghai
You can read Whole column And using For each row you can iterate it. in the loop you can use If Activity and gives the condition in If “Row = Nothing” then perform the action action you want in then Section.
Thanks & Regards

2 Likes

@rahatadi
I want to check if the next cell in A column is empty, then the program will stop.

As below picture is A4. What is the best command in If Activity to check this condition ?


Thanks so much!

Hi @jitendra_123

I want to check the next cell empty… The command " Row = Nothing " to check all row right ?

you do not need loop here,

if
dt.select(“So Tk = ‘’”).length > 0

@trunghai
I hope you got the Whole “A” column. after that you can iterate it in for each row. in the for each row use IF activity give the condition “Row = Nothing” it will work for you.
Thanks & Regards

@trunghai

this topic is somewhat relevant to this.

@rahatadi
Hi, I have met this error as below.

Hi @trunghai,

Please use the condition row(0).ToString ="" in if activity.

Warm regards,
Nimin

@trunghai
some quick and dirty solution.
please check

find_empty.xaml (14.9 KB)

@nimin
Thanks you so much!

But which is activity to stop immediately program when it detect the next empty cell.

@rahatadi
Thanks you so much always :slight_smile:

@trunghai

with for each loop and checking next cell is empty

if empty it will write line and exits from loop.

find_empty.xaml (20.6 KB)

Let me know, if it requires modification

Regards,
Aditya

1 Like

Hi @trunghai,

If you want to exit the iteration whenever a cell in the first column is empty , You can add a break activity in the ‘then’ section.

Regards,
Nimin

1 Like

@rahatadi
@nimin

Thanks you so much!

@trunghai

solved ?

Thanks you. I understood :slight_smile:

Great job…! :slight_smile:

1 Like

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