How to detect an empty column in excel?

I have a scenario where there’s an excel file in which there is some data which is being scraped from the web. If a particular row contains ‘Null’ data for any specified column, then I want it to take 0. How can I achieve this task in UiPath?

You can use row(“ColumnName”).ToString.Equals(String.Empty) this will return Boolean Value.

2 Likes

@jothyprasanth.m
Its not working out. The problem is, I have to add one field with another after assigning it a value. There I am getting a type error. I don’t understand why.

Hi,
Please try this and let us know if this helps.
inside for each if row.item(“ColumnName”).tostring.length=0 then add zero in that place or you can try like this as well

DT.AsEnumerable().Where(Function(r) r.ItemArray.Any(Function(a) string.IsNullOrEmpty(a.ToString))).Count>0.

Let us know if this helps.

Regards,
Pavan H

Refer this @vivek_Chowdary,