Text File to Excel conversion

Hi all,

I need a help to convert the text file to excel.
In the below Image You can see “Master Account Code” and “Agent Name” and so on …this are the Headers of the excel.
Now we need to extract the data from note pad file Starting with 4 spaces " B657A00"

Is there any logic to get this kind of information .
I have tried in this way

Help me if there is any solution .


@hemanth_chinna you can write regular expressions to match the requirement and retrieve the exact data.

strvalue.Split(Environment.NewLine.ToArray, StringSplitOptions.RemoveEmptyEntries) and use substring to extract value

Main.xaml (22.2 KB)

Iam using this logic, please check and correct me if I am wrong.

@sreekanth if possible can you add the logic which you have shared to me in this work flow.
Sorry about this Iam not getting exact scenario where to add that condition.


Use read text file and give ur notepad file.The output value is the strvalue

This splits your data line wise into array .Your data may be in fifthlineIterate.Perform substring through str[4]

Hi @sreekanth @hemanth_chinna @aksh1yadav

Can you please help to get the below logic how it works…

1)I have summary file(text File) which contains some partners data .(File1)
2)I have few failed partners data in excel.(File2)
Objective:Based on failed partners data,i need to keep that data in Summary file(File1) and remove the remaining partners data.File1.xlsx|attachment (7.8 KB)File1.xlsx (7.8 KB)