Text extraction


#1

i am having several txt files in a folder. All the files are of fixed format. I have to extract certain fields from all txt files which is fixed and write it into excel. Please help.


#2

Hi @htga99,

create string array variable -> arrvalue
folderlocation="C:\Arivu\Text"
arrvalue=Directory.GetFiles(folderlocation, ".txt")
using for each activity loop through it
use Read Text file activity to get the data from the text file
using regex get the data from the output string.
write the output into excel using write range activity

Regards,
Arivu


#3

what is Regex??


#4

Regular expression to get a specific data from the string.


#5

@htga99

If the format of text file is fixed then you can also use substring to extract the field.

Regards,
Mahesh