Get First Value in a Column Excel

Hello Everyone

Good day!

I’m automating using excel and I need to get the first value of a specific column. For example, in Column A, I need to get the first value then perform if statement. Anyone here can help me?

Name
James
Rosa
Angel
Joy

Output:
J
R
A
J

You should have to use string split method.

1 Like

or you can get the first value by the below method using assign activity

char ch = ColValue.ToCharArray().ElementAt(0);

ColValue is a variable and this variable value comes from the excel cell value.

Try this.

2 Likes

Hello @abu.behlim thanks for this! it works! :slight_smile:

I use assign activity

result = row(“Name”).ToString.Substring(0,1)

1 Like

Great @James_Callos :grin:

1 Like

Thanks mate!

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