Text File to Excel conversion

uiautomation

#1

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 .

Thanks.


#2

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


#3

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


#4

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.

Thanks


#5

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]