Hi,
Here is my read range (Input sheet):
The Output I need:
Basically in need all the names in one row and all the roll Numbers in another row in an new sheet
Number of rows and columns (in Input sheet) are dynamic and not fixed.
Thanks a lot
Hi,
Here is my read range (Input sheet):
The Output I need:
Basically in need all the names in one row and all the roll Numbers in another row in an new sheet
Number of rows and columns (in Input sheet) are dynamic and not fixed.
Thanks a lot
All 3 data merged in a new single sheet.
Image 1 is my Input sheet.
I Need output as image 2
Try below steps.
Use Read Range activity and specify range as “”. It will give output as DataTable and let’s say ‘InputDT’.
And then find total number of rows in the input file as below.
Int rowCount = InputDT.Rows.Count
And then use 3 Read Range activities to read each table and specify range as below.
"A1:C"+rowCount.ToString
"E1:G"+rowCount.ToString
"I1:K"+rowCount.ToString
And then use Merge DataTable activities to merge one table to other.
And then finally use Write Range activity to write into Excel file.
Hi,
Can you try the following sample?
This sample merges each column which starts with “Name” and “Roll No” dynamically.
(Assumed number of Name columns is same as Roll No)
dtResult = dt.AsEnumerable.SelectMany(Function(r) dt.Columns.Cast(Of DataColumn).Where(Function(c) c.ColumnName.StartsWith("Name")).Zip(dt.Columns.Cast(Of DataColumn).Where(Function(c2) c2.ColumnName.StartsWith("Roll No")), Function(x,y) dtResult.LoadDataRow({r(x),r(y)},False))).CopyToDataTable
Sample20210925-5.zip (7.1 KB)
Regards,
Hi @Bhanu_Rathore ,
In addition to solutions provided by others, I have attached my flow. It does following.
Thanks,
Kapil
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.