How to select particular row in text file and remove it in uipath
Hi @PriyankaM try this:
textvar.replace(split(textVar,Environment.newline).Take(“provide line number”))
Hi @PriyankaM ,
if what to remove based on Index use below option and change your Index
1= Your Index
String.Join(vbLf,st.Replace(st.Split(vbLf)(1),“”).Split({CChar(vbLf)},StringSplitOptions.RemoveEmptyEntries))
Thanks,
Rajkumar
Hi @PriyankaM
You can try the below one
First read text file using ‘Read Text File’ activity and store the result in a string variable(Ex:strtext)
then use the below,
LineArray=strtext.Split(Environment.NewLine.ToArray, StringSplitOptions.RemoveEmptyEntries)
LineArray=LineArray.Skip(2).ToArray()
Where 2 is the index of the line you want to eliminate/remove.
Hope this will be useful. Thank you.