How to do Sorting in this case

May I know how i can sort by “Type of sample”
Can anyone help me to edit my flow? Many thx!
For example:
From:


To:

excel
MU bias WB.xlsx (34.7 KB)
Workflow
Main MU-bias (cal).xaml (28.7 KB)

1 Like

Hello @Happydayyy , can you please be a bit more specific with what you want to achieve.

1 Like

@Happydayyy

1 Like


After I add the sort datatable activity
The result still be that:

the order as 3N, 3N, 4N, KR, 3N, 4N, KR
But I want the order is of data is sorted by “Type of sample”.
LIKE 3N, 3N, 3N, 4N, 4N,KR, KR.

workflow:
Main MU-bias (cal2.xaml (31.8 KB)

1 Like

@Happydayyy

I take the input as
image
I get the output as
image
I take order as “Ascending”

After build datatable you do sorting in the build datatable you have only two rows.After that you have for loop you performed some operations on it means you are adding data to your sortedDt.
and after that you are writing the SortedDT to your Excel.Sorting is performed when you add all your data to the SortedDt.Means i think you have to put sort datatable activity before Writing the SortedDt to excel.Please clarify my doubt

1 Like

Next step all databale variable i change to sortedt, but idk why the result cannot sort by type.
Can you demonstrate your workflow? Many thanks
Main MU-bias (cal2.xaml (31.8 KB)

1 Like

@Happydayyy

Please give me your workflow Process, and sample Excel data which you process in Main MU-bias i do your process.PLease give me step by step process which you do in that xaml. I give you the workflow.

1 Like

@Happydayyy

I want your overall explanation of your process what are the steps you do in the process.What is the outcome you want…?

Excel:
WB templ. 27.2.24.xlsx (40.0 KB)
Workflow
Main MU-bias (cal3.xaml (32.8 KB)
Thank you so much!!

I need to sort the data of ‘type of sample’ . for example, it is currently 3N, KR, 4N, 3N, KR, but i need it to be 3N,3N, 4N, 4N, KR, KR in order.

WB templ. 27.2.24.xlsx (40.0 KB)
This is the update ver. The sheet of templ is the sample what i want, thank you so much

@Happydayyy

We have to consider the No means in Second row we have “KR” ,Next row contains Nothing upto 8 th row right we have to take 2 to 7 as “KR” as Type of sample but it is present in only one row which contains the No.Am i correct please correct me if i am wrong.

yes, for example, first KR is in cell K2, then K3 to K7 is empty, second maybe 2N is in cell K8

@Happydayyy

HappyDayyssss.zip (103.5 KB)

I hope this will help you Please check the output excel output sheet.Hope it meets uour requirements.If any problem encounters please message

Thank you so much, but there is an issue that the No. (column A) is not in order after I edit the path. May I ask can you help me to fix this issue.

Workflow
Main MU-bias (cal3.1.xaml (40.1 KB)

@Happydayyy

If we sort the datatable based on the Type Of Sample then ofcourse remaining columns will also sort based on that column.Take this as example


Here we done the sorting based on Type of sample in ascending order So all columns in that row will be changed based on Type of Sample

Hope it gives better understanding for you

But in column A, the number is in wrong order,


can u help me how to fix this issue? Many thx!!!

My current workflow is:
Main MU-bias (cal3.1.xaml (40.1 KB)

@Happydayyy

Hello,

Please try this hope it works for you
HappyDayyssss.zip (110.7 KB)

1 Like

@Happydayyy

Is my above solution works for you,Do you need any other changes

1 Like

Thank you so much, it is work now.
If I have another issue about this robot later, may I ask you for help as well?

1 Like

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