Reading text file lines

I’m trying to Read a text file with with names.

For example

John Smith
Ryan Greves
Alex Smith

How can I loop it in a way that I read one name/line at a time?

Hi @S_N1
welcome to forum

you can try this way

  1. Read the text file using Read Text File actviity and store in string variable let’s say input_1

  2. now use assign actvity

array_var = Split(input_var,Environment.NewLine), where array_var is of String type [ array of string type]

Now use for each loop to loop over array array_var, with Type argument in for each loop as String.

Hope this information help you

Regards,
Nived N
Happy Automation

Thank you Nived!!

1 Like

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