Read line by line from text file and write only one line from the text file

Hi,
I need some help, I want to make a robot that read one line from a text file and write that line. But the challenge is that robot also will read other line from same text file but on specific date. Can anyone help please?

Hi Aoyama,

Read Text file Activity reads entire text in a file and returns text/string output. If text file contains new lines, output of the Read Text Activity contains newline char in between each line. So you can use Split method to get each line separately from the entire text.

Alternatively you can write a Custom Activity which can read the data line by line from a text file.

Thanks and Regards,
Tuhin

owh, okay I’ll try. Thanks

Hi @Tuhin_Samanta,

Can you tell me how to write a custom activity that you mean in previous chat?

Regards,
Aoyama

Hi Aoyama,

A simple step by step guide to create custom activity:

Regards,
Tuhin

1 Like

Hi,

This is the example that I’m working right now. The result is error because it’s said “system.string” instead of split the string. Can anyone help?
Main.xaml (7.6 KB)