Hi ,
I have data in txt file in the form of
Employee Name: xxxx
Desgination:xxx
Country:xxx
data should be in excel in the form of
Employee Name Desgination Country
XXX xxxxx xxxxx
Can you anyone?
Hi ,
I have data in txt file in the form of
Employee Name: xxxx
Desgination:xxx
Country:xxx
data should be in excel in the form of
Employee Name Desgination Country
XXX xxxxx xxxxx
Can you anyone?
Hii @Meda_SivaPrasad ,
Please check this workflow.
TxtToExcel.zip (1.9 KB)
TextToExcel.txt (71 Bytes)
Hope this might help you
Cheers,
Welcome to the community…
str.Split({"Employee Name:","Designation:","Country:"},StringSplitOptions.RemoveEmptyEntries).ToArray()
Hope this helps
cheers
Hi @Meda_SivaPrasad ,
As an alternate, you could also check with the below Steps :
Create an Output Datatable with the required columns using Build Datatable
activity, the Datatable let be named as OutputDT
.
Next, Use Matches
Activity with the input as the data from the text file and the Regex Expression as the below, get the Output to a variable, say mc
:
Employee Name:(.*)\s+Designation:(.*)\s+Country:(.*)
OutputDT = mc.Cast(Of Match).Select(Function(x)OutputDT.Rows.Add(x.Groups(1).ToString,x.Groups(2).ToString,x.Groups(3).ToString)).CopyToDatatable
Visuals :
Thank you It’s working.
Please mark it as solution if its working
Thank you.