Regex help when converting Text to Excel

Hi Team,

I am converting Text file to Excel using Regular Expression,I am almost done but in the last column i want to capture data from" EL03-Successfull" in seperate column but its included in before column.
I want to capture this data in last column of excelExcel Validation_Regex.zip (17.2 KB) :
image

But as per my Regular expression its copying in before column.
Attached total code and files.

Appreciate your help @lakshman @sarathi125 @Lahiru.Fernando @Palaniyappan

2 Likes

With the changes done,i can able to convert all lines except last line of file,can any one can help here.
Updated code as below:
Regex Text File to Excel.xaml (65.7 KB)

Agent APT_Validation 1.xlsx (14.6 KB)

Check this file, it is generated with the same workflow, I dont see any issue as you have mentioned. The EL03-Successful added into the last column of the excel sheet1.

1 Like

Thank you for the response @sarathi125

Below screen shot ,lat line last active column EL03-Successfull is missing
image

@RajeshT
Check this one, updated few things and tested with the input text file.

Regex Text File to Excel.xaml (66.5 KB)

Hi @sarathi125 ,

Its working perfectly but when the file having different status like “EL34-Sale branch is Mandatory” its displaying last word of error message .
image

image

@RajeshT,

The status will start always with “ELXX-” format?

1 Like

Yes @sarathi125 ,
you are correct its always start with EL03-,EL34-,EL56-

Regex Text File to Excel.xaml (67.4 KB)

Check this one, updated and tested.

1 Like

This is so perfect,thanks a ton @sarathi125.
image

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.