How to sort value in a Cell?

I have extracted values from a pdf through regex, all the details coming in different cells (1,21,2)(15,14,12). I want to sort the data in ascending order in all the cells of their rows.
image

1 Like

Hey @Rakesh_Yadav

Make sure you sort it before the write it in the excel.

What is the type of data variable you have before writing to excel?

Could you please confirm

#nK

1 Like

system.collection.generic.IEnumerable<system.Text.RegularExpressions.Match>

1 Like

Could you please share your workflow or the screenshot of the place where you write it to excel?

That is the place to add a small change over there.

Thanks
#nK

1 Like

image
image

1 Like

Hi @Rakesh_Yadav ,

You can use below invoke code.

test.xaml (6.5 KB)
You have to pass only value to it and it will give you the result.

2 Likes

@ermanoj3101 thanks, let me try.

1 Like

@Rakesh_Yadav Hope the solution is working. Please let us know if you want more help.

1 Like

showing this error.
Invoke code: Exception has been thrown by the target of an invocation.

1 Like

Not sure why it is failing in your case.
It’s working code.
I believe you have passed the argument to highlighted value.

2 Likes

my input value is not fix, some times it is single digit and some time it is more than three like: “20,19,18,14,16”.
your code is working in case of 3 digit.
can we make it dynamic?

1 Like

Can you share all values(input), i will make it dynamic…

1 Like

i have made some changes in code, now it is working for all values. Thanks @ermanoj3101 @Nithinkrishna

1 Like

Hey @Rakesh_Yadav

That’s great to hear. Happy automation.

1 Like

Hi @Rakesh_Yadav .

Try now it will work for each case.
test.xaml (6.6 KB)

2 Likes

@Rakesh_Yadav Is it similar to what you have done?

1 Like

@Rakesh_Yadav can you mark this solved?

Thanks.

1 Like

@ermanoj3101 , yes it is similar and now working perfectly. Thanks a lot.

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