Writing data into excel column based

I need to read a row from excel sheet/database query and copy the data into another excel vertically( read rows in database table/excel and in new excel it should be copied in vertical style)

How can i achieve this using UI path? Please do suggest on this

Vishal Kumar

1 Like


Any Inputs on how to do this ??

Convert the excel into datatable. Then use datatable.select(Condition) to set into DataRow.
Use for each loop to get individual row

Hi Bikash,

I am new to UI path. Can you please creare a sample project and share a dummy xaml file for this

Vishal Kumar

To be clear on the requirement, I have the input as


and I need the output as


Main.xaml (23.7 KB)

Please find the attachment. It contains a sample to copy from excel to datatable. it contains some other functionalities as well like datatable.clone .

Hi Bikash,

I think the solution you shared will not work for the requirement. Please correct me if I am wrong. I hope you are clear on the requirement. Please let me know if you need any further information

Vishal Kumar

I guess you want to transpose the datatable. please find my xaml below. You can find the code after the log message “Transpose” where Datatable has been converted into transposed Datatable.Main.xaml (38.3 KB)

Transform Excel Data.zip (9.3 KB)
Hi Vishal,

Please check the attached code…
I hope it will be helpful to you.

Please let me know if you need any more help regarding this


Hello. I need a little help for traspose row items (with value > 0 or not null) form a data table into columns, and create excel file for each row.
Here is my main excel file:

I filter it for each row that “total_com” >“0” to get items ftom “00056”, “00057” etc and what i want is to create an excel file with two columns having the header A1: " COD" and B1: “CANT” and to get the values as in this pic: Result%201 Result%202 Result%203
Each File must be saved as an excel named as in the main table “company_name” having just one sheet.
Looking forward for your answer,
Thank You

hi alk_kumar,
i did the same thingexactly same as your workflow but headers are missing.can u send me reply as soon as possible.