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
What should I input for the column name?
can you post screenshot of your table?
i mean show me Check.xlsx
Sorry! Is it correct to say this?
Hi @22222222asas ,
For each row if row is empty → break
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
column name should be “main news”
so it will be
Row("main news")
thank you so much~!
Is there a specific reason why a message box doesn’t appear when the cell value is empty?
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?
Replace your if condition as
hey @22222222asas
You are giving Range(“A1”) so it will takes only 1st row
Give like this
Excel.Sheet(“Sheet1”).Range(“”)
Have you tried it?
I apologize sincerely. Even though I changed the code as instructed, the message box still isn’t appearing.
String.IsNullOrEmpty(Row("main news").ToString)
Your column name having space between main news once check that