How to transpose datatable dynamically?

Hey everyone,

I want to transpose a datatable dynamically, ı have two columns which are name and value. The “name” one has to be colunms (labels) and value ones has to be rows under the labels.

Here is an example,


So according the above dt, ıt has to be like this;
Cinsiyet | Renk | Beden/Yaş ------> Columns(Labels)
Erkek | Açık Kırmızı | 40.5 —> Rows (Values)

It has to be dynamic, my dt can have 10 + rows.

Thank you so much.

Hi @arif_samet_ipek

You can refer the below youtube video for tranposing of datatable.

Hope it helps!!

2 Likes

@arif_samet_ipek

easiest would be to write data to excel and then use copy paste range and select transpose…then read back

cheers

2 Likes
  1. Use a Build DataTable activity to define dt_Input.
  2. Use an Invoke Code activity and pass dt_Input as In/Out Argument.
  3. The output (dt_Transposed) will be your dynamically transposed table.

This solution will work even if your input DataTable has more than 10 rows, as it dynamically processes all entries.

2 Likes

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