Few times while working with DataTables, we might want to convert rows to column and vice versa.
let’s see how to do that…!!!
Implementation using UiPath :
Let us implement a workflow to convert rows to columns in DataTable.
(If you find the logic a little difficult to understand, no worries please leave a comment and we will get back to you soon)
Drag “Excel application scope” and “Read Range” activities into the designer panel to read the input excel
Drag “While“, “Add Data Column” and “Assign” activities into the designer panel to create dummy columns
(Because here we are transposing the headers too)
Drag “For Each Row“, “While“, “Add Data Row” and “Assign” activities into the designer panel and write the logic to convert rows to columns.
Finally, execute the workflow to see the results 🙂
Click here to download the Source Code…
Hope it has helped you…