Sorting Table is getting incorrect

Hi Team,

How to sort the table in ascending order when table has commas between digits.
I tried my best but unable to solve the issue.
Kindly let me know, how to solve this issue.

sharing a image for the reference
image
image

Hi

Hope the below steps would help you resolve this

  1. First use a excel application scope and pass the file path as input and read the datatable using read range activity and get the output named dt

  2. Then use a assign activity with the below expression

Dt = (From row In Dt.Select Order By Convert.ToInt32(row(“Total”).ToString.Trim) Select row).ToArray.CopyToDatatable()

  1. Then use a WRITE RANGE activity and pass the above datatable variable as input and enable add headers property

Cheers @personal_mail

Thanks Palaniyappan for the reply.

First I’m extracting table data and then i have to sort this datatable and store it into the excel sheet.

For this process also the above solution will use?

1 Like

Yeah it does the same
Just the source of data is getting changed

I assumed it as coming from excel and read as dt

But I hope you get the dt from data extraction

So it’s fine
If you have the datatable variable ready then Let’s start from step 2

Cheers @personal_mail

inside the excel scope only should I do this process from step2 OR before excel scope can I use assign, mentioning your solution and using write range. This process im trying now.

Main.xaml (18.1 KB)
This is the code I done upto now sorted the table but its not getting correctly.

Please once look into this code and could you advise the solution for issue.