datadt.xlsx (8.4 KB)
can some one help to to provide xaml for this case
here:- I have to extract name after ] from E column
and
second, I have to check all names are same or not
datadt.xlsx (8.4 KB)
can some one help to to provide xaml for this case
here:- I have to extract name after ] from E column
and
second, I have to check all names are same or not
Hi
Hope these steps would help you resolve this
Use a excel application scope and pass the file path as input and use a read range activity with add headers property disabled in its property panel and get the output as dt
Then use a FOR EACH ROW activity and pass the dt as input
Inside the loop use a ADD TO COLLECTIONS activity and mention the property like this
Collections = list_names
Where list_names is a variable of type System.Collections.Generic.List(of string) defined in variable panel with default value as New List(of string)
And in item property mention as
Split(row(dt.Columns.Count-1).ToString,â]â)(1).ToString.Trim
This will get the name after ]
And as next property in add to collections change the argument as string
Bool_same = list_names.Distinct().ToList().Count.Equals(1)
If true it will give as true if not false m
True means all values are same else it is different
Hope this would help you
Cheers @ashishmani
Hi @ u can check this whether all names are same or not using single if condition itslef
dt1.AsEnumerable().Select(Function (row) System.Text.RegularExpressions.Regex.Match(row(4).ToString,"(?<=\]).*").Value.ToString).ToList().Distinct.Count=1
Regards
Nived N
can you help me to make xaml for me.
can you help me to make xaml for this.
test.xaml (6.9 KB)
Add To Collection: The property âCollectionâ of âAdd To Collectionâ is not initialized.
its always send the true value, even name is different
this only return the count of the name
You are almost done
Make sure you have created a variables in the variable panel and it has a default value
Where list_names is a variable of type System.Collections.Generic.List(of string) defined in variable panel with default value as New List(of string)
Cheers @ashishmani
I already did it, still have issue, please check my xaml
Is this done
@ashishmani
could you please share workflow Palnyappan I appreciate
It always send true, even name is different
test.xaml (7.8 KB)
datadt.xlsx (8.1 KB)
Fine
As per the image I thought the column we want is the last column
But it looks like we have two columns after them so letâs mention the index position
Like this
Try with below expression replacing the above one
IF(String.IsNullOrEmpty(row(4).ToString.Trim),String.Empty,Split(row(4).ToString,â]â)(1).ToString.Trim)
I mentioned as 4 as I could see the column from where we want answer is in 5th column position
Which means 4 is the index position as ndra position starts from 0 for first column
So if needed make the change accordingly
Cheers @ashishmani
Hi @ashishmani,
@Palaniyappan has already helped you. Here is a summary and a slightly different approach
I tested this on two of your datadt.xlsx files.
GetNameFromExcelColumn.xaml (12.8 KB)
datadt.xlsx (8.1 KB)
datadt.xlsx (8.4 KB)
@jeevith and @Palaniyappan thank you so much.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.