Here we discuss how to Transpose the data in Excel or a data table
What is meant by Transpose?
To change something from one position to another
In Excel Change the ROW as a column, COLUMN as a Row
- Transpose can achieve by two methods
→ Modern activity- Using Copy/Paste range Activity.(For Excel Processing)
→ Novigo Solutions. (For Datatable Processing)
Modern activity- Copy/Paste range Activity.
- By Using modern activity we can achieve the transpose method.
- For classic users can select
Show Modernfrom the Activity panel, now modern activities can use by classic users.
- USe Excel process scope and place the Use Excel Activity
In the use of excel activity select the path of the file required to transpose the data.
Drag and drop the Copy/Paste Range activity
In the source we need to provide the data need to transpose and the destination is to action which paste the transposed data.
Excel.Sheet("Sheet1") Where Excel is a variable of Reference as set on the Use Excel File Sheet("Sheetname") in which need to mention the Sheet name, Same for destination
Can also select what properties need to copy along with it.
It is mandatory to check or click the transpose option on Activity, Otherwise, just record copy and paste without transposing
- This activity transposes the input DataTable and provides the transposed DataTable as output.
- For more info check this thread.
Novigo Solutions - Transpose DataTable - RPA Component | UiPath Marketplace
- Need to install the activity from the manage packages
NovigoSolutions.TransposeDataTable.Activitiesfrom All packages and install, and save the activity. Refer to the screenshots by clicking Visual
- Read the Excel file need to transpose and save the output as a Data Table Variable
- Drag and drop the
Transpose Datatableactivity by Novigo.
- Pass the variable of Read Data Table in it. and can give the same Variable for output or Different variables also can pass in it.
- Using the write range activity we can write the transposed data into different sheets or different files.
For more reference, attached XAML file here
Tutorial_Transpose.zip (104.0 KB)