Hello there,
I was wondering if there is an option to unpivot excel column or data table column in UiPath?
For example: Changing this coulms
Into this one. I have tried several methods but didn’t get the desired output.
Thanks
Hello there,
I was wondering if there is an option to unpivot excel column or data table column in UiPath?
For example: Changing this coulms
Into this one. I have tried several methods but didn’t get the desired output.
Thanks
did you try create pivot table activity
provide the required details like source , destination , fields you want as rows
Regards
You can use power query to achieve this
Yes I know I can achive this using power query. But I want to know if there is such option in UiPath studio.
Hi @LAKSHMI_NARAYANA_PEMMASAN ,
I haven’t created pivot table activity. I want to have the excel data to be read and stored as DataTable
with several columns but those 3 colums in the above picture should be unpivoted as I have showed above.
I have created this using Excel Power Query
but I want to do it in UiPath Studio.
Regards
Michaek
There is no such activity in UiPath Studio to
achieve this.
There is no direct activity but you can try like this
dt
outdt
dt
"value" + currentindex.tostring
outdt.rows(0)("value" + currentindex.tostring) = currentrow("fee")
andoutdt.rows(1)("value" + currentindex.tostring) = currentrow("unitprice")
and outdt.rows(2)("value" + currentindex.tostring) = currentrow("total")
Cheers
I suggest you to use python scope in UiPath to address unpivot.
I have tried some ways to solve it such as to use sql or .net in UiPath, but failed.
And in the python script, use pandas package which has melt function to unpivot dataframe. That will solve your problem.
More details, you can see the article in my blog: