How to transpose the datatable using linq

I have to transpose the below datatable using linq
Below is the sample input datatable i have

CC Total Blocked
A 1500 150
B 2000 200
C 1000 100
D 2500 250
E 3000 300

I want to achieve the below result

1500 2000 1000 2500 3000
150 200 100 250 300

@Divya_Balasubramania Can you give a Try on this Activity :

After the Datatable Transpose, You have to Delete CC Column.

1 Like

Welcome to Forum

Maybe or Not you are expecting a LINQ stateme t that is doing the complete transponation including Datatable structure creation Handling as one Statement.

Catching the columns, transponation and returning IT as a list of object() can bei done with Linq quite pretty. But structure creation, row additional is stressing the Query Nature of LINQ

I really Like LINQ and Work a Lot with IT. but in some cases IT IS better to Setup hybrid approaches. Combine activities with Linq Statements or use only activities

There are some activities as one is mentioned by @supermanPunch. Another from Our friend @Lahiru.Fernando Here
Data Manipulations - RPA Component | UiPath Marketplace

Let me know If you are Interessed on a hybrid approach, so i can Work Out an example for you


Thanks for your quick reply… Let me try to use any one of the solutions mentioned

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