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?
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?
I have to transpose my data table first (top picture) so that I can move the values to the other excel workbook (bottom picture)?
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
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
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).
How do I get the “Month” and “Distance” to appear?
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.
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
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.
From where did you get the input data?
Extract data from documents that were provided to me
have you stored the extracted data into an excel?
have you stored the extracted data into an excel?
have you used read range activity in your workflow?
regards