How to perform string manipulation for column in filter datatable

Hi everyone ,

My requirement i have two excel and i need to compare so i am using for each for first datatable and using filter datatable with second datatable to get matched output dt

in the input i am using column name of second datatable and row of first datatable

i.e., “Appointment” = System.text.regularexpressions.regex(row(“Appointment”).tostring,“[\s]”,“”)

so how to use the same for left hand side ?

@Palaniyappan any suggestions

Thanks in advance

Hello @kavya.s16 ,

Here are you trying to find the exact of rows in 2 datatable or only the match of one column data. Can you share the screenshot of the 2 Excels?

@kavya.s16 For comparison LINQ helps better instead of for each. if you want to try can you share the excel sheets with sample data

Also, can you explain what data you want to compare(rows or columns) ?

Hi @Rahul_Unnikrishnan , i am matching the datas in two different excels using filter datatable , sorry due to client data will not be able to share screenshots

I am filter datatable to match the datas

Hello @kavya.s16

It’s ok… but can you confirm whether you need to compare all the rows in both the excel or some column values

If entire row to row comparison, then you can watch the below video

1 Like

@Rahul_Unnikrishnan but the two excels i am comparing one has spaces differently bcoz of tab space , its been extracted like and what i am trying to do is replace all the spaces and then compare

System.text.regularexpressions.regex(row(“Appointment”).tostring,“[\s]”,“”) something like this
but to the left hand side i am just passing column name and if use this System.text.regularexpressions.regex(strTemp.tostring,“[\s]”,“”) where strTemp = “Appointment” its still considering it has string rather than a column

Hi @kavya.s16 ,

Could you Maybe provide us with Sample examples of your Input Data and also the Expected Output for that Input Data ?

This way we’ll be able to identify the actual issue and suggest/provide a solution in a better way.

@kavya.s16

can you share 2 sample files and explain the requirement here for that sample files…It would be better of you can manually populate the output and share that.

We can try replicate the same thing using UiPath