Hi team ,
I have data in excel with single line row with multiple data so I need to transpose entire row in to “A”column . Please suggest any simple idea to achieve this . I tried multiple option which is giving in our community. But no luck .
Regards
Krishna
Hi
Have a view on this
Few times while working with DataTables, we might want to convert rows to column and vice versa. let’s see how to do that…!!! Example Implementation using UiPath : Let us implement a workflow to convert rows to columns in DataTable. (If you find the...
Est. reading time: 1 minute
Hope this helps
Cheers @Krishnakumar_Vasudevan
Hello @Krishnakumar_Vasudevan
Try Excel Modern Activity
Hello @suraj.l
Try this by using Modern Excel activity
Using Copy/Paste Activity :
Utilise Excel Modern Activities to perform data Transpose.
Excel Process Scope → Use Excel file → Copy/Paste Activity
[image]
Select the Source and Destination Sheets .
Next, select the “All” option and activate the Transpose option.
[image]
To Enable Modern Activity:
Activity>Filter>Modern (Select it)
[image]
In Source, You can add the specific Range.
ppr
(Peter)
September 18, 2023, 11:04am
4
We do understand:
is to bring into this format:
|V1|
|V2|
|V3|
|V4|
We would do e.g.
Read range - unticked AddHeaders - dtData
Build DataTable - configure 1 column - dtResult
For each Activity | item in dtData.Rows(0).ItemArray | TypeArgument: object
Add Data Row Activity | DataTable=dtResult, ArrayRow= new Object(){item}
RajKumar_DC
(RajKumar Durai)
September 18, 2023, 11:09am
5
Hi @Krishnakumar_Vasudevan ,
Input
Output
Workflow
Thanks,
Array row getting compiler error like identifier expected
If I gave value like. new.Object.{item} .
Please advice .
ppr
(Peter)
September 18, 2023, 12:38pm
7
Krishnakumar_Vasudevan:
new.Object.{item} .
pay attention at the not needed dots
new Object(){item}
Thanks That error gone but getting error on add data row activity while executing.
Add row row .cannot set column ‘column1’ the value violates the max length limit of this column .
ppr
(Peter)
September 18, 2023, 12:48pm
9
maybe better you will reread the above description ( do not mix up several mentioned variations)
Modelling could look like this:
Build DataTable - dtResult
Add DataRow:
Will do:
Hi @Krishnakumar_Vasudevan ,
transcope.xaml (13.9 KB)
You can try it
input
output
Thanks Peter transpose worked . I want to write output in same excel to another sheet so I kept append range inside for loop each and data is getting duplicated .
ppr
(Peter)
September 19, 2023, 3:39pm
13
Lets try to scope the topic = 1 case
So in DataTable the transponation is working, right
We can check with
Understanding the 6 Debugging Panels of UiPath in the easiest way possible! - News / Tutorials - UiPath Community Forum
So we would recommend to close the topic
Forum FAQ - How to mark a post as a solution - News / Tutorials - UiPath Community Forum
Krishnakumar_Vasudevan:
for loop each
we are surprised about the for each loop. Maybe you will create a separate topic for it.
In case you feel that this question is still in scope with this origin topic then please share with us some similar sample input data and expected output. Feel free to share also your XAML with us
I found the issue now and fixed it . It’s really helpful thanks pete …!!