How to transfer value from one excel workbook to another excel workbook?

distance by month

Hello! How do I move the values in column B (Distance) to row 2 (Distance) according to the months? What activities should I use and how to use them?

Hi @helpplease

Please transpose the data table by following the below video

Hope it helps!!

Hi,

@helpplease

I hope this will help you

I have to transpose my data table first (top picture) so that I can move the values to the other excel workbook (bottom picture)?

@helpplease

The video attached gives you the complete knowledge regarding the transpose of data table and also I will upload a process xaml please give me sometime.

Regards

@helpplease

Please follow the below steps
1.First take the Read Range activity and uncheck the headers so that it should read all the rows and columns
2.Use assign activity and take a variable and assign

dt_result = New System.Data.DataTable

3.Use for each and pass the below syntax in List of items filed

dt_Sampledata.AsEnumerable().Select(Function(x) x(0).ToString).ToArray

4.In body of for each use the add data column activity and give the required data
5.Again use an assign activity and assign the linq query

dt_result = (From column In Enumerable.Range(1,dt_Sampledata.ColumnCount-1)
Let rowitem = Enumerable.Range(0,dt_Sampledata.RowCount).Select(Function(row) dt_Sampledata.Rows(row)(column)).toArray
Select dt_result.Rows.Add(rowitem)).copytodatatable

6.At last use the write range activity and check the add headers option.



and I have uploaded a xaml for your reference
sample.xaml (13.5 KB)

Regards

Hi @helpplease

if you find the solution to your query please mark it as solution

Regards

I’ve combined the sequence you did with the current sequence I have. But the “Month” and “Distance” did not appear. I’ve used a “Build Data Table” activity right at the top of my sequence to put the data seen in the top picture that I send for help (2h ago).


result

How do I get the “Month” and “Distance” to appear?

@helpplease

Can you send me your sequence

Regards

@helpplease

Could you share me xaml or else screenshots of the process you did

Regards

give me a while, because the sequence i have is used for real data that i cannot share. The ones i send for help are dummy data.

@helpplease

Okay or else please elaborate your query what happened after attaching my sequence to your original sequence.

regards

After I attached your sequence and changing it to the variable names I have, I ran the whole sequence. But rather than seeing

      A

1 Month |Aug-20 |Jul-20 |Sep-20 |Oct-20 |
2 Distance| 600| 500| 550| 700|

The result I have is
A
1 Aug-20|Jul-20|Sep-20|Oct-20
2 600| 500| 550| 700

So I’m missing the “Month” and “Distance”

There are some other activities here that i cannot show



@helpplease

When you used read range activity have you unchecked the headers section?

regards

I didn’t write dtData into a sheet yet after “Add Data Row” activity because I just want to have one worksheet with one table, so I put the assign activity from your sequence.

@helpplease

From where did you get the input data?

Extract data from documents that were provided to me

@helpplease

have you stored the extracted data into an excel?

@helpplease

have you stored the extracted data into an excel?

have you used read range activity in your workflow?

regards