Hi i want to read a output no only which can be many from a text file and save them into an excel

I have text file , below is the format

This is an input text
Following output numbers were successfully added to file

Output Output Output
Number Date Type

12345 01-may-2019 hgh
12346 01-may-2019 hghg
12347 01-may-2019 hghh
12348 01-may-2019 hghg
12349 01-may-2019 hgh

now i want to save only output numbers(12345,12346,12347 all present in file) in excel file,testfilesnippet

—use read text file and pass the file path of that text File and get the output with a variable of type string
—now pass that string variable to GENERATE DATATABLE ACTIVITY and get the output with a variable of type datatable named outdt
—use remove datacolumn and mention the column index as 1 and mention the datatable name as well
—use another of same activity and mention the column index as 2
—now we will be having only first column in the datatable and we can write that to a excel with write range activity

Hope this would help you
Kindly try this and let know for any queries or clarification
Cheers @UiPathMaster

Can i have that text file with sample data in it if possible
Cheers @UiPathMaster

Will it always be 5 numbers?

You can use Regex “\d{5}” to select all of them then loop through the Result

It may change.

To use Regex and other String manipulation techniques you would need to have some kind of pattern, so if you can detect the pattern you can use these.