Transpose excel data

hi everyone,
I need to transpose the data from row to column and column to row where rows and columns are both dynamic.
this need to be perform without excel shortcut keys, linq query, and macro vba.
if possible through looping and data table activities.

Note- Rows and columns are dynamic.

Hi @suraj.l

Check this:

or

1 Like

hi @supriya117 i don’t need activities as of they are third party packages might get error in future as i mention in post through looping or any datatable activities it is possible or not please let me know.

@suraj.l

In modern Activities we have a activity copy/Paste Range in that Enable Transpose

Hope It Helps!!

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

  • Select the Source and Destination Sheets .
  • Next, select the “All” option and activate the Transpose option.

To Enable Modern Activity:
Activity>Filter>Modern (Select it)

hi @Gokul_Jayakumar
i had used earlier modern activities sometimes it won’t work proper so i switched my every process in classic activities it works easily.
as i mention in post through looping or any data table it is possible or not please let me know.

Hi @sasi_poosarla
I had used earlier modern sometimes it won’t work proper so i switched my every process in classic activities it works easily.
as i mention in post through looping or any data table it is possible or not please let me know.

@suraj.l , You can access the Modern activities from Classic Process.

Try the above one. It will display the Modern activities along with Clasic.
For only the transpose step you can use it.
Otherwise you need to use the LinQ Expression.

@suraj.l

If you want to iterate through datatable, check this

Yes is possible as also indicated by others with Link sharings:

For Excel:

  • read in - without add Headers
  • use first column - all rows as column names and construct a new datatable schema
  • then iterate over all columns with colindex > 1 and use all row values as values

For DataTable:

  • in general same logic, we just set first column name with a default as it is the turning point

Excel case (Modelling sample)
Preparation
grafik
DataTable: an empty DataTable initialized with dtResult = new DataTable
ColumnName = row(0).toString.Trim

Transponation:

@suraj.l
Refer to this Xaml file you may get some idea.

Transpose.xaml (11.4 KB)

2 Likes

@Gokul_Jayakumar
this is helpful for row to column also provide xaml where rows are dynamic.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.