Counting row data length

I want to count the length of a certain column’s row data and check with multiple condition in IF activity. If the condition is met then in other column it’ll write “valid” else “invalid”.

I’m getting wrong length in my variable.

1 Like

@nibir08

You have to specify like this.

  rowlength = row("ColumnName").Tostring.Length

Here, replace ColumnName with required column name in your excel file you need to check.

1 Like

You were almost done
In the first assign activity inside the FOR EACH ROW loop we have mentioned the row variable alone but haven’t the columnname
row variable is a Datarow type and if we want to check with a particular column in that we need to mention the column name as a string or its index

So the expression be like this in that assign activity
rowlength = row(“yourcolumnname”).ToString.Length
Or
If you don’t know the column name then
rowlength = row(columnindex).ToString

Where columnindex is the index value that usually starts from 0 for the first column

Cheers @nibir08

1 Like

thanx for the help :smiley:

1 Like

Cheers @nibir08

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