Skip if the Excel cell is blank help me

How can I skip to the next value if an Excel cell is empty and retrieve the next value?
I am currently using the ‘For Each Excel Row’ activity.

add this @22222222asas

1 Like

What should I input for the column name?

can you post screenshot of your table?

1 Like

There are no tables; this is all there is

i mean show me Check.xlsx

1 Like

image
Sorry! Is it correct to say this?

Hi @22222222asas ,
For each row if row is empty → break

1 Like

@22222222asas

in the else block or below if activitywhich ever activities you need to performed place there.

Replace CurrentRow(0) with CurrentRow(“Main news”) so that it will work

use this will gives you all the cell values which are not empty

dt.AsEnumerable.Where(Function(x) not x(“Main news”).ToString.Equals(“”)).CopyToDataTable

1 Like

column name should be “main news”

so it will be

Row("main news")

1 Like

thank you so much~!
Is there a specific reason why a message box doesn’t appear when the cell value is empty?

Hi @22222222asas

Give this in IF condition
String.IsNullOrEmpty(Row(“main news”).ToString)

@lrtetala
I’m sorry, I didn’t understand. Could you please explain it again?

@22222222asas

Replace your if condition as
image

1 Like

@22222222asas

Can you change the if condition as mentioned above

1 Like

@lrtetala

Even so, the message box isn’t appearing. Is there any potential issue you can think of?

image

hey @22222222asas

You are giving Range(“A1”) so it will takes only 1st row

Give like this
Excel.Sheet(“Sheet1”).Range(“”)

1 Like

@22222222asas

Have you tried it?

I apologize sincerely. Even though I changed the code as instructed, the message box still isn’t appearing.

@22222222asas

String.IsNullOrEmpty(Row("main news").ToString)

Your column name having space between main news once check that

image

1 Like