welcome
IAM New
I need to understand reading this file is easy, but I also want to read a specific line for example
What I want is how to request a line from these lines, knowing that what is inside it is variable, that is, it is not fixed. I want to call number 2 for example and put it in Verabil
1 helow uipath
2your name
3age
Found this but I can’t recall a specific column
ppr
(Peter Preuss)
December 10, 2021, 7:31pm
2
you can do:
read text activity strText
then split the text: arrLines = strText.Split({Environment.NewLine}, StringSplitOptions.None)
accessing the second line by arrLines(1)
Or
With variation
strLine = File.ReadLines(FileName).Skip(1).Take(1).First()
Or
using reader = new StreamReader(“SourceSettings.txt”))
skip the result of first reader.ReadLine(); // skip
read second line: secondLine = reader.ReadLine();
close the reader
1 Like
Is it possible for you to clarify, I put the code on more than one site, but it did not work?
ppr
(Peter Preuss)
December 10, 2021, 9:16pm
4
feras_assaf:
but it did not work
Also share with us, what is not working e.g. validation message and what you have done so far. thanks
wher i put this code split the text: arrLines = strText.Split({Environment.NewLine}, StringSplitOptions.None)
ppr
(Peter Preuss)
December 13, 2021, 10:56am
6
1 Like